Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-4810

edoclite should give message to user when buttons are pressed


    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s:
    • Fix Version/s: Backlog
    • Component/s: Development
    • Labels:
    • Rice Module:
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required


      Two requests:

      1. By default, when a "route" or "approve" or any button is pressed, the edoclite displays again in readonly form with no message to the user that it was submitted. This confuses users. By default The edoclite should be able to display "The form was submitted" or something at the top in a div that can be styled.

      2. Rice should have a variable which should be able to be queried from xsl that indicated that the page is being displayed due to a user action being submitted. Then the edoclite is more flexible in how this is handled.

      Here is the current workaround and comments from Eric:

      Chris, I think this is a good enhancement request and would welcome you submitting a jira for this. The post method sounds like a good workaround, though it would cause problems if it were the way this was implemented in the general case (i.e. for those who might be using dropdown-refresh behavior which does a post, or for those who are using multi-page forms). Would it be sufficient for edoclite to expose the last "action" that was taken, or at least information that an action was taken? Seems you could key off of individual actions (such as submit and approve) or just the fact that a document action was taken in order to display a reasonable message to the user. And EDL should probably display something reasonable by default anyway.


      On Nov 4, 2010, at 2:24 AM, Chris Hyzer wrote:

      I guess I still don't understand how this would work...

      <xsl:if test="$docStatus = 'ENROUTE' and $isUserInitiator and $globalReadOnly">

      I think doc status is ENROUTE when people approve, right? I would like the message to appear for the initiator or any approvers after clicking a button
      Same comment on isUserInitiator
      For globalReadOnly, same comment, are there cases where globalReadOnly is true that aren't after someone clicks a button? i.e. when viewing a document? Or when approving?

      Does anyone else want this? Should I open a Jira so there is a built in way?

      This is how I handled it, it seems to work (let me know if there is a gap). Im sure there is a better way, but thought I would share, just detect if http method is post...

      1. Make a filter to hold the request in a threadlocal (does this exist already)?


      • @author mchyzer
      • $Id$
        package test;

      import java.io.IOException;

      import javax.servlet.Filter;
      import javax.servlet.FilterChain;
      import javax.servlet.FilterConfig;
      import javax.servlet.ServletException;
      import javax.servlet.ServletRequest;
      import javax.servlet.ServletResponse;
      import javax.servlet.http.HttpServletRequest;

      public class HttpRequestThreadLocalFilter implements Filter {

      /** keep the request here */
      private static ThreadLocal<HttpServletRequest> threadLocalHttpServletRequest = new ThreadLocal<HttpServletRequest>();


      • @see javax.servlet.Filter#destroy()
        public void destroy() {


      • @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
        public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
        throws IOException, ServletException {

      HttpServletRequest httpServletRequest = (HttpServletRequest)servletRequest;

      { filterChain.doFilter(httpServletRequest, servletResponse); }


      { threadLocalHttpServletRequest.remove(); }



      • @return the request
        public static HttpServletRequest httpServletRequest() { return threadLocalHttpServletRequest.get(); }


      • see if this is a post
      • @return if this is a post
        public static boolean isPost() {
        HttpServletRequest httpServletRequest = threadLocalHttpServletRequest.get();
        if (httpServletRequest != null)
        Unknown macro: { if (httpServletRequest.getMethod() == "POST") { return true; } }

        return false;


      • @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
        public void init(FilterConfig arg0) throws ServletException {


      2. Put this in the web.xml



      3. Put something in a common text file:
      <xsl:template name="submittedMessage">
      <div class="submittedMessage">The form was submitted</div>

      4. Add something to the CSS:


      { padding:5px; border-color:#7794C9; border-width:3px; border-style:dashed; margin-top: 20px; margin-bottom: 10px; font-weight: bold; }

      5. Add to edoclite or widgets:

      <xsl:variable name="isPost" select="java:test.HttpRequestThreadLocalFilter.isPost()" />

      <xsl:when test="($isPost)">
      <xsl:call-template name="submittedMessage" />

      From: Westfall, Eric Curtis ewestfal@indiana.edu
      Sent: Wednesday, November 03, 2010 11:18 PM
      To: Chris Hyzer
      Cc: Carroll, Timothy Dale; rice.collab@kuali.org
      Subject: Re: [kuali] confirmation of submitted edoclite

      We have a couple of enhancements we need to contribute back from IU, one is the ability to define <param name="..."> style configuration in your edl definition and then utilize that from the stylesheets. As part of that, we implemented a feature that allows you to turn off the "disabled" html input tags and replace them with text output which is the way that most applications work when displaying read only data. This is particularly important for textareas when the content is outside of the visible area.

      Additionally, there is some state you can read from the edl xml to determine if the user just submitted/approved the document. We do it for some of our docs here, here is the specific condition we use:

      <xsl:variable name="docHeaderId" select="/documentContent/documentState/docId" />
      <xsl:variable name="docStatus" select="//documentState/workflowDocumentState/status" />
      <xsl:variable name="isUserInitiator" select="my-class:isUserInitiator($docHeaderId)" />
      <xsl:if test="$docStatus = 'ENROUTE' and $isUserInitiator and $globalReadOnly">

      Hope that's useful.


      On Nov 3, 2010, at 9:31 PM, Chris Hyzer wrote:

      Thanks, do you mind sharing that?


      ----Original Message----
      From: Carroll, Timothy Dale tcarroll@illinois.edu
      Sent: Wednesday, November 03, 2010 1:17 PM
      To: Chris Hyzer
      Cc: rice.collab@kuali.org
      Subject: Re: [kuali] confirmation of submitted edoclite

      I'm sure you could modify the widgets.xml to check for this condition before displaying the read-only form. In fact, what we have done is to reformat the document when it is in a read-only state to address accessibility and usability problems. For example, put text in <span> and <div> tags, so text that is in <textarea> and <input> fields are not locked from scrolling etc. People generally prefer to read the text as a document rather than a form. This reformatting has also made it more printer friendly as well.


      On Nov 3, 2010, at 12:42 PM, Chris Hyzer wrote:

      We might have discussed this before, but we are getting complaints from confused users so I will ask again...

      When an edoclite is submitted (routed, accepted, etc), the screen turns readonly, and the upper right says ENROUTE.

      Is it possible to put text on that screen that says "Your form was submitted" or something so the user knows that the button did something?

      Or... can I detect something when the screen is displaying so I know it is in the READONLY clicked state, so I can do something in javascript or something to put that message in a DIV or javascript alert or something?




          mchyzer Chris Hyzer (Inactive) created issue -
          jcoltrin Jessica Coltrin (Inactive) made changes -
          Field Original Value New Value
          Issue Type Bug Fix [ 1 ] Improvement [ 4 ]
          Fix Version/s 1.0.4? [ 16014 ]
          jcoltrin Jessica Coltrin (Inactive) made changes -
          Fix Version/s 2.x-backlog [ 15811 ]
          Fix Version/s 1.x-backlog [ 16014 ]
          jcoltrin Jessica Coltrin (Inactive) made changes -
          Start Date
          Fix Date [ set to sprint end date ]
          spatterson Shem Patterson (Inactive) made changes -
          Workflow custom [ 88246 ] Copy of custom for rice [ 206983 ]
          spatterson Shem Patterson (Inactive) made changes -
          Workflow Copy of custom for rice [ 206983 ] custom [ 216731 ]
          spatterson Shem Patterson (Inactive) made changes -
          Workflow custom [ 216731 ] Rice Workflow [ 226479 ]
          kbtaylor Kristina Taylor (Inactive) made changes -
          Fix Version/s Middleware Backlog [ 17860 ]
          Fix Version/s Backlog [ 15811 ]
          kbtaylor Kristina Taylor (Inactive) made changes -
          Fix Version/s Backlog [ 15811 ]
          Fix Version/s Middleware Backlog [ 17860 ]
          kbtaylor Kristina Taylor (Inactive) made changes -
          Rice Module KEW [ 10870 ]
          kbtaylor Kristina Taylor (Inactive) made changes -
          Rank Ranked higher
          ewestfal Eric Westfall made changes -
          Labels Old


            • Assignee:
              mchyzer Chris Hyzer (Inactive)
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: