Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.8RC1, 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      Throughout the forums, users are complaining about the fact that ValueChangeEvents happen before UPDATE_MODEL_VALUES, so if they programmatically set the values for other input components, then those values will be stomped over with the decoded (converted and validated) values. There are two main solutions, to clear out the submitted values on the target components, or to re-queue the ValueChangeEvent to INVOKE_APPLICATION, which requires bean code modifications.

      What would be simpler is to add a component, ice:eventSetPhase, which could override UIComponentBase.queueEvent(FacesEvent), and reset the PhaseId on the FacesEvents passing through. That way, ValueChangeEvents from child components could be flipped to INVOKE_APPLICATION.

      By default it would change all FacesEvents to INVOKE_APPLICATION, but it would have two attributes to optionally constrain this behaviour. The "events" attribute would be a space delimited list of class types to act on, and the "phase" attribute would be the PhaseId to set the FacesEvents to.

      Here's a discussion on the topic in the JSF RI dev mailing list:
      https://javaserverfaces.dev.java.net/servlets/ReadMsg?list=dev&msgNo=1750

        Activity

        Mark Collette created issue -
        Mark Collette made changes -
        Field Original Value New Value
        Description Throughout the forums, users are complaining about the fact that ValueChangeEvents happen before UpdateModel, so if they programmatically set the values for other input components, then those values will be stomped over with the decoded (converted and validated) values. There are two main solutions, to clear out the submitted values on the target components, or to re-queue the ValueChangeEvent to InvokeApplication, which requires bean code modifications.

        What would be simpler is to add a component, ice:eventSetPhaseId, which could override UIComponentBase.queueEvent(FacesEvent), and reset the PhaseId on the FacesEvents passing through. That way, ValueChangeEvents from child components could be flipped to InvokeApplication.

        By default it would change all FacesEvents to InvokeApplication, but it would have two attributes to optionally constrain this behaviour. The "events" attribute would be a comma delimited list of class types to act on, and the "phaseId" attribute would be the PhaseId to set the FacesEvents to.
        Throughout the forums, users are complaining about the fact that ValueChangeEvents happen before UpdateModel, so if they programmatically set the values for other input components, then those values will be stomped over with the decoded (converted and validated) values. There are two main solutions, to clear out the submitted values on the target components, or to re-queue the ValueChangeEvent to InvokeApplication, which requires bean code modifications.

        What would be simpler is to add a component, ice:eventSetPhaseId, which could override UIComponentBase.queueEvent(FacesEvent), and reset the PhaseId on the FacesEvents passing through. That way, ValueChangeEvents from child components could be flipped to InvokeApplication.

        By default it would change all FacesEvents to InvokeApplication, but it would have two attributes to optionally constrain this behaviour. The "events" attribute would be a comma delimited list of class types to act on, and the "phaseId" attribute would be the PhaseId to set the FacesEvents to.

        Here's a discussion on the topic in the JSF RI dev mailing list:
        https://javaserverfaces.dev.java.net/servlets/ReadMsg?list=dev&msgNo=1750
        Security Private [ 10001 ]
        Assignee Mark Collette [ mark.collette ]
        Ken Fyten made changes -
        Fix Version/s 1.8DR#2 [ 10142 ]
        Ken Fyten made changes -
        Fix Version/s 1.8DR#3 [ 10143 ]
        Fix Version/s 1.8DR#2 [ 10142 ]
        Ken Fyten made changes -
        Salesforce Case []
        Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial]
        Assignee Priority P2
        Ken Fyten made changes -
        Salesforce Case []
        Security Private [ 10001 ]
        Mark Collette made changes -
        Summary ice:eventSetPhaseId ice:eventSetPhase
        Salesforce Case []
        Description Throughout the forums, users are complaining about the fact that ValueChangeEvents happen before UpdateModel, so if they programmatically set the values for other input components, then those values will be stomped over with the decoded (converted and validated) values. There are two main solutions, to clear out the submitted values on the target components, or to re-queue the ValueChangeEvent to InvokeApplication, which requires bean code modifications.

        What would be simpler is to add a component, ice:eventSetPhaseId, which could override UIComponentBase.queueEvent(FacesEvent), and reset the PhaseId on the FacesEvents passing through. That way, ValueChangeEvents from child components could be flipped to InvokeApplication.

        By default it would change all FacesEvents to InvokeApplication, but it would have two attributes to optionally constrain this behaviour. The "events" attribute would be a comma delimited list of class types to act on, and the "phaseId" attribute would be the PhaseId to set the FacesEvents to.

        Here's a discussion on the topic in the JSF RI dev mailing list:
        https://javaserverfaces.dev.java.net/servlets/ReadMsg?list=dev&msgNo=1750
        Throughout the forums, users are complaining about the fact that ValueChangeEvents happen before UPDATE_MODEL_VALUES, so if they programmatically set the values for other input components, then those values will be stomped over with the decoded (converted and validated) values. There are two main solutions, to clear out the submitted values on the target components, or to re-queue the ValueChangeEvent to INVOKE_APPLICATION, which requires bean code modifications.

        What would be simpler is to add a component, ice:eventSetPhase, which could override UIComponentBase.queueEvent(FacesEvent), and reset the PhaseId on the FacesEvents passing through. That way, ValueChangeEvents from child components could be flipped to INVOKE_APPLICATION.

        By default it would change all FacesEvents to INVOKE_APPLICATION, but it would have two attributes to optionally constrain this behaviour. The "events" attribute would be a space delimited list of class types to act on, and the "phase" attribute would be the PhaseId to set the FacesEvents to.

        Here's a discussion on the topic in the JSF RI dev mailing list:
        https://javaserverfaces.dev.java.net/servlets/ReadMsg?list=dev&msgNo=1750
        Hide
        Mark Collette added a comment -

        From discussion, we'll make it do nothing by default, and you have to specify the events and phase to make it do anything, that way applications can use ValueBindings for those attributes, to enable/disable it if need be. Plus, the whole idea is to make things more declarative, and default actions are not declarative.

        In deciding between calling this component <ice:eventSetPhase> and <ice:setEventPhase>, I'm going with <ice:setEventPhase>, since it flows better, and is more consistent with the naming of othe JSF tags, like <f:setPropertyActionListener>.

        Show
        Mark Collette added a comment - From discussion, we'll make it do nothing by default, and you have to specify the events and phase to make it do anything, that way applications can use ValueBindings for those attributes, to enable/disable it if need be. Plus, the whole idea is to make things more declarative, and default actions are not declarative. In deciding between calling this component <ice:eventSetPhase> and <ice:setEventPhase>, I'm going with <ice:setEventPhase>, since it flows better, and is more consistent with the naming of othe JSF tags, like <f:setPropertyActionListener>.
        Mark Collette made changes -
        Summary ice:eventSetPhase ice:setEventPhase
        Salesforce Case []
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18241 Wed Jan 28 12:03:58 MST 2009 mark.collette ICE-3486 : ice:setEventPhase
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/jsp/web/WEB-INF/includes/content/navigation.jspx
        Commit graph ADD /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/ice/components/SetEventPhase-component.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/facelets-enh/src/org/icefaces/application/showcase/view/jaxb/resources/application_structure_es.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/resources/messages_es.properties
        Commit graph ADD /icefaces/trunk/icefaces/samples/component-showcase/portlets/web/Components_SetEventPhase.jspx
        Commit graph MODIFY /icefaces/trunk/icefaces/component/conf/META-INF/facelet/icefaces.taglib.xml
        Commit graph ADD /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/seteventphase
        Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/faces-config.xml
        Commit graph ADD /icefaces/trunk/icefaces/component/doc/es/setEventPhase.html
        Commit graph ADD /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/custom/setEventPhase-renderer.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/facelets-enh/src/org/icefaces/application/showcase/view/jaxb/resources/application_structure_en.xml
        Commit graph ADD /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/custom/setEventPhase-component.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/facelets-enh/src/org/icefaces/application/showcase/view/jaxb/resources/application_structure.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/jsp/web/showcase.jspx
        Commit graph ADD /icefaces/trunk/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/bean/examples/component/setEventPhase
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/portlets/conf/liferay/liferay-portlet.xml
        Commit graph ADD /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/ice_cust_properties/cust-setEventPhase-props.xml
        Commit graph ADD /icefaces/trunk/icefaces/samples/component-showcase/common-web/WEB-INF/includes/examples/custom/setEventPhase.jspx
        Commit graph ADD /icefaces/trunk/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/bean/examples/component/setEventPhase/SetEventPhaseBean.java
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/portlets/conf/portlet.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/resources/messages_en.properties
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/common-web/WEB-INF/faces-config-example-beans.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/portlets/conf/liferay/liferay-display.xml
        Commit graph ADD /icefaces/trunk/icefaces/component/doc/setEventPhase.html
        Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/extended-faces-config.xml
        Commit graph ADD /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/seteventphase/SetEventPhase.java
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/facelets/web/WEB-INF/includes/content/navigation.jspx
        Commit graph ADD /icefaces/trunk/icefaces/component/doc/en/setEventPhase.html
        Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/faces-config-base.xml
        Hide
        Mark Collette added a comment -

        Made the setEventPhase component, its metadata, documentation, and added it to the JSP, Facelets, Facelets-enh, Portlets component-showcase.

        Subversion 18241
        icefaces\component-metadata\src\main\resources\conf\custom\setEventPhase-component.xml
        icefaces\component-metadata\src\main\resources\conf\custom\setEventPhase-renderer.xml
        icefaces\component-metadata\src\main\resources\conf\ice\components\SetEventPhase-component.xml
        icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-setEventPhase-props.xml
        icefaces\component\doc\en\setEventPhase.html
        icefaces\component\doc\es\setEventPhase.html
        icefaces\component\doc\setEventPhase.html
        icefaces\component\src\com\icesoft\faces\component\seteventphase\SetEventPhase.java
        icefaces\samples\component-showcase\common-src\org\icefaces\application\showcase\view\bean\examples\component\setEventPhase\SetEventPhaseBean.java
        icefaces\samples\component-showcase\common-web\WEB-INF\includes\examples\custom\setEventPhase.jspx
        icefaces\samples\component-showcase\portlets\web\Components_SetEventPhase.jspx

        icefaces\component-metadata\src\main\resources\conf\extended-faces-config.xml
        icefaces\component-metadata\src\main\resources\conf\faces-config-base.xml
        icefaces\component-metadata\src\main\resources\conf\faces-config.xml
        icefaces\component\conf\META-INF\facelet\icefaces.taglib.xml
        icefaces\samples\component-showcase\common-src\org\icefaces\application\showcase\view\resources\messages_en.properties
        icefaces\samples\component-showcase\common-src\org\icefaces\application\showcase\view\resources\messages_es.properties
        icefaces\samples\component-showcase\common-web\WEB-INF\faces-config-example-beans.xml
        icefaces\samples\component-showcase\facelets-enh\src\org\icefaces\application\showcase\view\jaxb\resources\application_structure.xml
        icefaces\samples\component-showcase\facelets-enh\src\org\icefaces\application\showcase\view\jaxb\resources\application_structure_en.xml
        icefaces\samples\component-showcase\facelets-enh\src\org\icefaces\application\showcase\view\jaxb\resources\application_structure_es.xml
        icefaces\samples\component-showcase\facelets\web\WEB-INF\includes\content\navigation.jspx
        icefaces\samples\component-showcase\jsp\web\showcase.jspx
        icefaces\samples\component-showcase\jsp\web\WEB-INF\includes\content\navigation.jspx
        icefaces\samples\component-showcase\portlets\conf\liferay\liferay-display.xml
        icefaces\samples\component-showcase\portlets\conf\liferay\liferay-portlet.xml
        icefaces\samples\component-showcase\portlets\conf\portlet.xml

        Show
        Mark Collette added a comment - Made the setEventPhase component, its metadata, documentation, and added it to the JSP, Facelets, Facelets-enh, Portlets component-showcase. Subversion 18241 icefaces\component-metadata\src\main\resources\conf\custom\setEventPhase-component.xml icefaces\component-metadata\src\main\resources\conf\custom\setEventPhase-renderer.xml icefaces\component-metadata\src\main\resources\conf\ice\components\SetEventPhase-component.xml icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-setEventPhase-props.xml icefaces\component\doc\en\setEventPhase.html icefaces\component\doc\es\setEventPhase.html icefaces\component\doc\setEventPhase.html icefaces\component\src\com\icesoft\faces\component\seteventphase\SetEventPhase.java icefaces\samples\component-showcase\common-src\org\icefaces\application\showcase\view\bean\examples\component\setEventPhase\SetEventPhaseBean.java icefaces\samples\component-showcase\common-web\WEB-INF\includes\examples\custom\setEventPhase.jspx icefaces\samples\component-showcase\portlets\web\Components_SetEventPhase.jspx icefaces\component-metadata\src\main\resources\conf\extended-faces-config.xml icefaces\component-metadata\src\main\resources\conf\faces-config-base.xml icefaces\component-metadata\src\main\resources\conf\faces-config.xml icefaces\component\conf\META-INF\facelet\icefaces.taglib.xml icefaces\samples\component-showcase\common-src\org\icefaces\application\showcase\view\resources\messages_en.properties icefaces\samples\component-showcase\common-src\org\icefaces\application\showcase\view\resources\messages_es.properties icefaces\samples\component-showcase\common-web\WEB-INF\faces-config-example-beans.xml icefaces\samples\component-showcase\facelets-enh\src\org\icefaces\application\showcase\view\jaxb\resources\application_structure.xml icefaces\samples\component-showcase\facelets-enh\src\org\icefaces\application\showcase\view\jaxb\resources\application_structure_en.xml icefaces\samples\component-showcase\facelets-enh\src\org\icefaces\application\showcase\view\jaxb\resources\application_structure_es.xml icefaces\samples\component-showcase\facelets\web\WEB-INF\includes\content\navigation.jspx icefaces\samples\component-showcase\jsp\web\showcase.jspx icefaces\samples\component-showcase\jsp\web\WEB-INF\includes\content\navigation.jspx icefaces\samples\component-showcase\portlets\conf\liferay\liferay-display.xml icefaces\samples\component-showcase\portlets\conf\liferay\liferay-portlet.xml icefaces\samples\component-showcase\portlets\conf\portlet.xml
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Krashan Brahmanjara added a comment -

        BTW
        Current example from component-showcase doesn't show results of this feature. I mean results with this feature andt without. The same working example exist in Selection example.

        Show
        Krashan Brahmanjara added a comment - BTW Current example from component-showcase doesn't show results of this feature. I mean results with this feature andt without. The same working example exist in Selection example.
        Hide
        Mark Collette added a comment -

        Yes, we don't have an example of how, without this tag, the code would be broken. I'm not sure that people would understand an application misbehaving, as an example. But what is does demonstrate, is how much simpler this tag is, than the work-arounds used in the Selection example. Both are valid ways of solving the problem, but setEventPhase is simpler, doesn't require any bean code, and is more declarative.

        Show
        Mark Collette added a comment - Yes, we don't have an example of how, without this tag, the code would be broken. I'm not sure that people would understand an application misbehaving, as an example. But what is does demonstrate, is how much simpler this tag is, than the work-arounds used in the Selection example. Both are valid ways of solving the problem, but setEventPhase is simpler, doesn't require any bean code, and is more declarative.
        Ken Fyten made changes -
        Fix Version/s 1.8 [ 10161 ]
        Assignee Priority P2
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Mark Collette [ mark.collette ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Collette
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: