Details
-
Type: Bug
-
Status: Closed
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: EE-1.8.2.GA_P04
-
Fix Version/s: EE-1.8.2.GA_P05
-
Component/s: Bridge, ICE-Components
-
Labels:None
-
Environment:
-
Assignee Priority:P1
Description
{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.
-
Hide
- ice-8796.war
- 5.39 MB
- Deryk Sinotte
-
- META-INF/MANIFEST.MF 0.1 kB
- WEB-INF/classes/org/.../test/TestBean.class 2 kB
- WEB-INF/classes/org/.../test/TestBean.java 1 kB
- WEB-INF/faces-config.xml 2 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/lib/backport-util-concurrent.jar 319 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-discovery.jar 75 kB
- WEB-INF/lib/commons-el.jar 110 kB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/icefaces-comps.jar 1.76 MB
- WEB-INF/lib/icefaces.jar 1.24 MB
- WEB-INF/lib/jsf-api-1.2.jar 355 kB
- WEB-INF/lib/jsf-impl-1.2.jar 837 kB
- WEB-INF/lib/jstl.jar 20 kB
- index.jsp 0.9 kB
- test.jspx 4 kB
- WEB-INF/web.xml 9 kB
-
Hide
- ice-8796.zip
- 14 kB
- Deryk Sinotte
-
- ice-8796/build.xml 2 kB
- __MACOSX/ice-8796/._build.xml 0.2 kB
- ice-8796/.../web.sunri.icefaces.ce.xml 9 kB
- ice-8796/src/.DS_Store 6 kB
- __MACOSX/ice-8796/src/._.DS_Store 0.1 kB
- ice-8796/src/org/.../test/TestBean.java 1 kB
- ice-8796/web/.DS_Store 6 kB
- __MACOSX/ice-8796/web/._.DS_Store 0.1 kB
- ice-8796/web/index.jsp 0.9 kB
- __MACOSX/ice-8796/web/._index.jsp 0.2 kB
- ice-8796/web/test.jspx 4 kB
- ice-8796/web/WEB-INF/faces-config.xml 2 kB
- __MACOSX/ice-8796/.../._faces-config.xml 0.2 kB
- ice-8796/web/WEB-INF/web.xml 9 kB
- __MACOSX/ice-8796/web/WEB-INF/._web.xml 0.2 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
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.
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="#
">
<ice:inputText value="hit enter"
action="#
"
actionListener="#
"
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.
Assigning to Mircea. We need to find a way to let the original fix and this feature co-exist.
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 .
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
Verified on complex forms with buttons in panelTabSet and something like below - bean.submit is executed on click in ice:selectBooleanCheckbox