ICEfaces
  1. ICEfaces
  2. ICE-8796

ice:inputText actionListener not fired with partialSubmit=true (ICE-5122 regression)

    Details

    • Assignee Priority:
      P1

      Description

      This scenario
      {code}
      //in this example again the inputText will process the event, when hitting enter on inputText
      <ice:form actionListener="#{bean.formListener}">
      <ice:inputText actionListener="#{bean.textListener}" />
      {code}

      not works in http://anonsvn.icesoft.org/repo/icefaces/trunk/icefaces rev. 32567. Only form action listener is fired.

        Activity

        Krashan Brahmanjara created issue -
        Hide
        Krashan Brahmanjara added a comment -

        Verified on complex forms with buttons in panelTabSet and something like below - bean.submit is executed on click in ice:selectBooleanCheckbox

         
        <ice:form action="#{bean.submit}" >   
         <ice:commandLink actionListener="#{bean.sdsd}" immediate="true" >
           <ice:selectBooleanCheckbox  value="true"  />
         </ice:commandLink>
        </ice:form>
        
        Show
        Krashan Brahmanjara added a comment - Verified on complex forms with buttons in panelTabSet and something like below - bean.submit is executed on click in ice:selectBooleanCheckbox <ice:form action= "#{bean.submit}" > <ice:commandLink actionListener= "#{bean.sdsd}" immediate= "true" > <ice:selectBooleanCheckbox value= "true" /> </ice:commandLink> </ice:form>
        Ken Fyten made changes -
        Field Original Value New Value
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Ken Fyten made changes -
        Fix Version/s EE-1.8.2.GA_P05 [ 10331 ]
        Affects Version/s EE-1.8.2.GA_P05 [ 10331 ]
        Assignee Priority P1 [ 10010 ]
        Ken Fyten made changes -
        Component/s Bridge [ 10011 ]
        Component/s Components [ 10012 ]
        Hide
        Deryk Sinotte added a comment -

        Attaching test .war (built for Tomcat) and a zipped copy of the source that can but unzipped to the [icefaces1.8]/icefaces/samples directory and built using the normal ant scripts (e.g. ant clean tomcat6.0).

        The page logs the various actions and actionListeners that are called to the server console. For example:

        TestBean.formListener: called
        TestBean.formAction: called

        TestBean.textListener: called
        TestBean.textAction: called

        TestBean.buttonListener: called
        TestBean.buttonAction: called

        Going through the various tests in the page, I am unable to reproduce the regression that you are seeing. For me, the EE_P01 release behaves the same as the trunk (I used rev 32600). Perhaps you could look at the page (test.jspx) or the TestBean and comment on what else is needed to recreate the results you've observed.

        Show
        Deryk Sinotte added a comment - Attaching test .war (built for Tomcat) and a zipped copy of the source that can but unzipped to the [icefaces1.8] /icefaces/samples directory and built using the normal ant scripts (e.g. ant clean tomcat6.0). The page logs the various actions and actionListeners that are called to the server console. For example: TestBean.formListener: called TestBean.formAction: called TestBean.textListener: called TestBean.textAction: called TestBean.buttonListener: called TestBean.buttonAction: called Going through the various tests in the page, I am unable to reproduce the regression that you are seeing. For me, the EE_P01 release behaves the same as the trunk (I used rev 32600). Perhaps you could look at the page (test.jspx) or the TestBean and comment on what else is needed to recreate the results you've observed.
        Deryk Sinotte made changes -
        Attachment ice-8796.war [ 15082 ]
        Attachment ice-8796.zip [ 15083 ]
        Hide
        Deryk Sinotte added a comment -

        Okay, I was finally able to reproduce. The problem appears to be related to the use of partialSubmit and was introduced between the P03 and P04 releases. Perhaps turning off partialSubmit would be a potential workaround.

        When running the test with partialSubmit off, I don't see any issues in either EE version of ICEfaces. However, given the following markup (setting partialSubmit=true on the inputText):

        <ice:form action="#

        {testBean.formAction}

        "
        actionListener="#

        {testBean.formListener}

        ">

        <ice:inputText value="hit enter"
        action="#

        {testBean.textAction}

        "
        actionListener="#

        {testBean.textListener}

        "
        partialSubmit="true"/> <br/>

        <ice:commandButton value="Submit"/> <br/>

        </ice:form>

        With P03, when I put the cursor in the inputText field and type the Enter key, it does a single request with the follow parameter:

        ice.event.type:onkeypress

        and the following is logged:

        TestBean.textListener: called
        TestBean.textAction: called

        With P04, if I do the same thing, it sends two requests with different event types:

        ice.event.type:onclick

        followed by:

        ice.event.type:onkeyup

        And the following logging is recorded:

        TestBean.formListener: called
        TestBean.formAction: called
        TestBean.textListener: called
        TestBean.textAction: called

        The changes responsible were done for ICE-7186 (specifically the initial changes at revision 27740). The modifications were also ported to the ICEfaces 3 trunk and EE branches so it is possible the problem exists there too but I don't think we generally recommend the use of the compat version of inputText components with JSF 2.

        Show
        Deryk Sinotte added a comment - Okay, I was finally able to reproduce. The problem appears to be related to the use of partialSubmit and was introduced between the P03 and P04 releases. Perhaps turning off partialSubmit would be a potential workaround. When running the test with partialSubmit off, I don't see any issues in either EE version of ICEfaces. However, given the following markup (setting partialSubmit=true on the inputText): <ice:form action="# {testBean.formAction} " actionListener="# {testBean.formListener} "> <ice:inputText value="hit enter" action="# {testBean.textAction} " actionListener="# {testBean.textListener} " partialSubmit="true"/> <br/> <ice:commandButton value="Submit"/> <br/> </ice:form> With P03, when I put the cursor in the inputText field and type the Enter key, it does a single request with the follow parameter: ice.event.type:onkeypress and the following is logged: TestBean.textListener: called TestBean.textAction: called With P04, if I do the same thing, it sends two requests with different event types: ice.event.type:onclick followed by: ice.event.type:onkeyup And the following logging is recorded: TestBean.formListener: called TestBean.formAction: called TestBean.textListener: called TestBean.textAction: called The changes responsible were done for ICE-7186 (specifically the initial changes at revision 27740). The modifications were also ported to the ICEfaces 3 trunk and EE branches so it is possible the problem exists there too but I don't think we generally recommend the use of the compat version of inputText components with JSF 2.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32630 Wed Dec 05 16:22:44 MST 2012 mircea.toma ICE-8796 The applied fix changes the renderer to write out the 'onkeypress' handler that will cancels the default action during the key press event during partial submit. This will prevent the 'click' event from being sintetically generated during the form submission triggered by the enter key.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/InputTextRenderer.java
        Hide
        Deryk Sinotte added a comment -

        Assigning to Mircea. We need to find a way to let the original fix and this feature co-exist.

        Show
        Deryk Sinotte added a comment - Assigning to Mircea. We need to find a way to let the original fix and this feature co-exist.
        Deryk Sinotte made changes -
        Priority Major [ 3 ] Critical [ 2 ]
        Assignee Deryk Sinotte [ deryk.sinotte ] Mircea Toma [ mircea.toma ]
        Hide
        Mircea Toma added a comment -

        The applied fix changes the renderer to write out the 'onkeypress' handler for partial submit enabled text entries thus canceling the default action during the key press event during partial submit. This will prevent the 'click' event from being sintetically generated during the form submission triggered by the enter key.

        This fix is was already applied for normal submits but not partial submits. See more here: http://jira.icesoft.org/browse/ICE-8240?focusedCommentId=40839&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-40839 .

        Show
        Mircea Toma added a comment - The applied fix changes the renderer to write out the 'onkeypress' handler for partial submit enabled text entries thus canceling the default action during the key press event during partial submit. This will prevent the 'click' event from being sintetically generated during the form submission triggered by the enter key. This fix is was already applied for normal submits but not partial submits. See more here: http://jira.icesoft.org/browse/ICE-8240?focusedCommentId=40839&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-40839 .
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Affects Version/s EE-1.8.2.GA_P04 [ 10280 ]
        Affects Version/s EE-1.8.2.GA_P05 [ 10331 ]
        Ken Fyten made changes -
        Summary Regression ICE-5122 ice:inputText actionListener not fired with partialSubmit=true (ICE-5122 regression)
        Hide
        Krashan Brahmanjara added a comment -

        I'm not sure if it really works with facelets. I got now Icefaces 1.8 from trunk revision 32630 and this code example do not work.

        <ice:form id="wn" actionListener="#{bean.submitOnEnter}">
          <ice:panelTabSet id="ts1" >
          (...)
          </ice:panelTabSet>
          <ice:commandButton actionListener="#{bean.submit}" />
        </ice:form>
        

        Of course, on Enter there is ping pong with server and two phases (apply and validations) are executed but submitOnEnter is not called
        (object wn:ts1 is targeted probably).

        Request example
        ice.submit.partial=true&ice.event.target=wn%3Ats1%3A0.5&ice.event.captured=wn%3Ats1%3A0.5&ice.event.type=onclick&ice.event.alt=false&ice.event.ctrl=false&ice.event.shift=false&ice.event.meta=false&ice.event.x=0&ice.event.y=0&ice.event.left=true&ice.event.right=false&wn=&icefacesCssUpdates=&javax.faces.ViewState=1&javax.faces.RenderKitId=ICEfacesRenderKit&wn%3Alb2=GRA%2FCB%2F1
        &wn%3Alb3=Mod&wn%3Ap1data=2012-12-19&wn%3A_idwn%3Ap1datasp=&wn%3A_idcl=wn%3Ats1%3A0&wn%3Ats1%3A0.5=wn%3Ats1%3A0.5&ice.session=5zxFYEK3GYKEveY_fVQ3og&ice.view=1&ice.focus=wn%3Ats1%3A0.5&rand=0.6700723026997178

        Show
        Krashan Brahmanjara added a comment - I'm not sure if it really works with facelets. I got now Icefaces 1.8 from trunk revision 32630 and this code example do not work. <ice:form id= "wn" actionListener= "#{bean.submitOnEnter}" > <ice:panelTabSet id= "ts1" > (...) </ice:panelTabSet> <ice:commandButton actionListener= "#{bean.submit}" /> </ice:form> Of course, on Enter there is ping pong with server and two phases (apply and validations) are executed but submitOnEnter is not called (object wn:ts1 is targeted probably). Request example ice.submit.partial=true&ice.event.target=wn%3Ats1%3A0.5&ice.event.captured=wn%3Ats1%3A0.5&ice.event.type=onclick&ice.event.alt=false&ice.event.ctrl=false&ice.event.shift=false&ice.event.meta=false&ice.event.x=0&ice.event.y=0&ice.event.left=true&ice.event.right=false&wn=&icefacesCssUpdates=&javax.faces.ViewState=1&javax.faces.RenderKitId=ICEfacesRenderKit&wn%3Alb2=GRA%2FCB%2F1 &wn%3Alb3=Mod&wn%3Ap1data=2012-12-19&wn%3A_idwn%3Ap1datasp=&wn%3A_idcl=wn%3Ats1%3A0&wn%3Ats1%3A0.5=wn%3Ats1%3A0.5&ice.session=5zxFYEK3GYKEveY_fVQ3og&ice.view=1&ice.focus=wn%3Ats1%3A0.5&rand=0.6700723026997178
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Krashan Brahmanjara
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: