ICEfaces
  1. ICEfaces
  2. ICE-5750

Persistent Message(s) support required for singleSubmit/partialSubmit

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: Framework, ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2.0 Glimmer w/ Sparkle components
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration

      Description

      In order to provide the desired "partialSubmit" behavior for ICEfaces 2.0, we need a way to have the message and messages components persist messages from previously executed components into future render phases, even when that component is not executed.

      For example, say you have a form with 3 inputText components in it, each with an associated message component. Each inputText component has "partialSubmit=true, required=true" specified:
         1. Tab into inputText #1, then tab out without entering anything -> message comp. for that comp. displays "Required" error message.
         2. Tab out of inputText #2 without entering anything -> message comps. for both inputText #1 and #2 should both now display the "required" error messages (std. JSF behavior will clear the message for inputText #1 as it wasn't executed when inputText#2 was via partialSubmit).


      Note that partialSubmit in this case is equivalent to "execute=this, render=all".

        Issue Links

          Activity

          Ken Fyten created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Link This issue blocks ICE-5720 [ ICE-5720 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0-Beta [ 10231 ]
          Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration]
          Hide
          Ken Fyten added a comment -

          Perhaps creating custom message(s) components could provide this functionality.

          Show
          Ken Fyten added a comment - Perhaps creating custom message(s) components could provide this functionality.
          Hide
          Ken Fyten added a comment -

          Mark says:

          Instead of a component, this might fit better as a framework feature.

          When a component is executed, right before decoding it marks itself as valid. Then, as it fails conversion or validation, it marks itself as invalid, and generated a FacesMessage, which it puts into the FacesContext. JSF 2 add some field about failing validation, which I'm not sure exactly what the nuanced difference is from being invalid. Then, at the end of the lifecycle, the FacesMessages are cleared away. We just need some code to save all the FacesMessages away, so that when we then do subsequent lifecycles, as we then execute whichever sub-tree of the component tree, whatever is not executed, and yet is still invalid, and possibly what will be rendered (needs discussion), will have its FacesMessages re-added to the component tree. The framework, in conjunction to the PartialViewContext, may have access to this information, and be able to accomplish this. But a component probably won't have access to that information.

          Show
          Ken Fyten added a comment - Mark says: Instead of a component, this might fit better as a framework feature. When a component is executed, right before decoding it marks itself as valid. Then, as it fails conversion or validation, it marks itself as invalid, and generated a FacesMessage, which it puts into the FacesContext. JSF 2 add some field about failing validation, which I'm not sure exactly what the nuanced difference is from being invalid. Then, at the end of the lifecycle, the FacesMessages are cleared away. We just need some code to save all the FacesMessages away, so that when we then do subsequent lifecycles, as we then execute whichever sub-tree of the component tree, whatever is not executed, and yet is still invalid, and possibly what will be rendered (needs discussion), will have its FacesMessages re-added to the component tree. The framework, in conjunction to the PartialViewContext, may have access to this information, and be able to accomplish this. But a component probably won't have access to that information.
          Ken Fyten made changes -
          Summary Persistent Message(s) support required for partialSubmit. Persistent Message(s) support required for partialSubmit
          Salesforce Case []
          Ken Fyten made changes -
          Assignee Mark Collette [ mark.collette ]
          Hide
          Ken Fyten added a comment -

          Okay, current thinking is to have the framework handling the task of cacheing the faces-messages, and then offer a custom component(s) that provides the necessary behaviour, leveraging the framework support.

          Show
          Ken Fyten added a comment - Okay, current thinking is to have the framework handling the task of cacheing the faces-messages, and then offer a custom component(s) that provides the necessary behaviour, leveraging the framework support.
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Priority P1
          Hide
          Mark Collette added a comment -

          We should identify what to do with global FacesMessage(s), that don't have an associated clientId.

          Show
          Mark Collette added a comment - We should identify what to do with global FacesMessage(s), that don't have an associated clientId.
          Hide
          Mark Collette added a comment -

          We'll re-add global messages, when not executing everything, if the old global message's summary and detail don't match any new global.

          Show
          Mark Collette added a comment - We'll re-add global messages, when not executing everything, if the old global message's summary and detail don't match any new global.
          Hide
          Mark Collette added a comment -

          One issue with this solution is that even with a full execute, only the current form actually executes. So, if you have faces messages created in form A, then submit form B, you'll still lose the faces messages from form A, since it won't execute, even though it's a full execute.

          Show
          Mark Collette added a comment - One issue with this solution is that even with a full execute, only the current form actually executes. So, if you have faces messages created in form A, then submit form B, you'll still lose the faces messages from form A, since it won't execute, even though it's a full execute.
          Ken Fyten made changes -
          Fix Version/s 2.0-Beta2 [ 10242 ]
          Fix Version/s 2.0-Beta1 [ 10231 ]
          Ken Fyten made changes -
          Security Private [ 10001 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22322 Mon Sep 13 08:24:45 MDT 2010 mark.collette ICE-5750 : Persistent Message(s) support required for partialSubmit
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/event/FacesMessagesPhaseListener.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/faces-config.xml
          Hide
          Mark Collette added a comment -

          Initial commit of faces message recovery, for faces messages that are: global, from components, where there was a partial execute. This leaves scenarios of full execute, but where the component is either in or out of the submitting form.

          Subversion 22322

          Show
          Mark Collette added a comment - Initial commit of faces message recovery, for faces messages that are: global, from components, where there was a partial execute. This leaves scenarios of full execute, but where the component is either in or out of the submitting form. Subversion 22322
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22342 Tue Sep 14 13:46:57 MDT 2010 mark.collette ICE-5750 : Persistent Message(s) support required for partialSubmit
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/event/FacesMessagesPhaseListener.java
          Hide
          Mark Collette added a comment -

          Commented out some print statements.
          Subversion 22342

          Show
          Mark Collette added a comment - Commented out some print statements. Subversion 22342
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22377 Fri Sep 17 18:51:57 MDT 2010 mark.collette ICE-5750 : Persistent Message(s) support required for partialSubmit
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/FacesMessagesPhaseListener.java
          Hide
          Mark Collette added a comment -

          Switched the saving of faces messages to happen pre-render, so that they'll survive state saving, when using the state saving strategy of not keeping the view root. Also, found a deficiency in the algorithm for detecting if a component was executed, when the form's prependId property is false. Fixed that with a visitTree implementation that does not require interpretation of clientIds to determine component parentage.

          Subversion 22377

          Show
          Mark Collette added a comment - Switched the saving of faces messages to happen pre-render, so that they'll survive state saving, when using the state saving strategy of not keeping the view root. Also, found a deficiency in the algorithm for detecting if a component was executed, when the form's prependId property is false. Fixed that with a visitTree implementation that does not require interpretation of clientIds to determine component parentage. Subversion 22377
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22378 Mon Sep 20 10:05:29 MDT 2010 mark.collette ICE-5750 : Persistent Message(s) support required for partialSubmit
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/webapp/WEB-INF
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/java/org
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/java/org/icefaces
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/resources
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/webapp/index.jsp
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/webapp
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/java
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/java/org/icefaces/demo/messages
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/java/org/icefaces/demo
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/build.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/build.properties
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/webapp/facesMessages.xhtml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/webapp/WEB-INF/web.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22379 Mon Sep 20 12:49:30 MDT 2010 mark.collette ICE-5750 : Persistent Message(s) support required for partialSubmit
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/src/main/java/org/icefaces/demo/messages/FacesMessagesBean.java
          Hide
          Mark Collette added a comment -

          Added a sample application for testing in a single form, with h: components.

          icefaces2\samples\test\messages
          Subversion 22378
          Subversion 22379

          Show
          Mark Collette added a comment - Added a sample application for testing in a single form, with h: components. icefaces2\samples\test\messages Subversion 22378 Subversion 22379
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22393 Tue Sep 21 18:12:15 MDT 2010 mark.collette ICE-5750 : Persistent Message(s) support required for partialSubmit
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/test/messages/Instructions.rtf
          Hide
          Mark Collette added a comment -

          Added Instructions.rtf file to the icefaces2\samples\test\messages test application, detailing the steps to take to verify the functionality.

          Subversion 22393

          Show
          Mark Collette added a comment - Added Instructions.rtf file to the icefaces2\samples\test\messages test application, detailing the steps to take to verify the functionality. Subversion 22393
          Mark Collette made changes -
          Link This issue blocks ICE-6113 [ ICE-6113 ]
          Hide
          Mark Collette added a comment -

          We should now support the typical scenarios of f:ajax and singleSubmit scenarios, inside a single form, requiring persisting of FacesMessage objects that are global and are tied to components.

          Show
          Mark Collette added a comment - We should now support the typical scenarios of f:ajax and singleSubmit scenarios, inside a single form, requiring persisting of FacesMessage objects that are global and are tied to components.
          Mark Collette made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22841 Mon Oct 25 12:55:35 MDT 2010 mark.collette ICE-5750 : Persistent Message(s) support required for partialSubmit
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/FacesMessagesPhaseListener.java
          Hide
          Mark Collette added a comment -

          Now suppress adding component messages when those messages already exist for that component. This a work-around for an issue where we're duplicating messages.

          Subversion 22841

          Show
          Mark Collette added a comment - Now suppress adding component messages when those messages already exist for that component. This a work-around for an issue where we're duplicating messages. Subversion 22841
          Ken Fyten made changes -
          Summary Persistent Message(s) support required for partialSubmit Persistent Message(s) support required for singleSubmit/partialSubmit
          Salesforce Case []
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.1 [ 10241 ]
          Fix Version/s 2.0-Beta2 [ 10242 ]
          Assignee Priority P1
          Ken Fyten made changes -
          Salesforce Case []
          Affects Version/s 2.0.0 [ 10230 ]
          Affects Version/s 2.0-Alpha3 [ 10032 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0.0 [ 10230 ]
          Fix Version/s 2.1 [ 10241 ]
          Affects Version/s 2.0.0 [ 10230 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Mark Collette
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: