Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2-EE-GA
-
Fix Version/s: 1.8.3, 1.8.2-EE-GA_P02, 2.0.0
-
Component/s: ICE-Components
-
Labels:None
-
Environment:All
Description
It is called only once when clicking on the actual button. Also if using the ICEfaces extending request scope or session scope the listener is always called once.
-
Hide
- Case9082Example.war
- 7.31 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/.../example/TestBean.class 2 kB
- WEB-INF/faces-config.xml 0.6 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-fileupload.jar 56 kB
- WEB-INF/lib/commons-logging.jar 30 kB
- WEB-INF/lib/icefaces-comps.jar 1.95 MB
- WEB-INF/lib/icefaces-facelets.jar 596 kB
- WEB-INF/lib/icefaces.jar 1.19 MB
- WEB-INF/lib/jsf-api.jar 352 kB
- WEB-INF/lib/jsf-impl.jar 822 kB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/lib/jxl.jar 708 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/web.xml 4 kB
- index.jsp 0.1 kB
- main.jspx 2 kB
-
Hide
- Case9082Example.zip
- 17 kB
- Arran Mccullough
-
- Case9082Example/build.xml 3 kB
- Case9082Example/nbproject/ant-deploy.xml 2 kB
- Case9082Example/nbproject/build-impl.xml 44 kB
- Case9082Example/.../faces-config.NavData 0.3 kB
- Case9082Example/.../genfiles.properties 0.4 kB
- Case9082Example/.../private.properties 2 kB
- Case9082Example/nbproject/.../private.xml 0.2 kB
- Case9082Example/.../project.properties 2 kB
- Case9082Example/nbproject/project.xml 2 kB
- Case9082Example/src/conf/MANIFEST.MF 0.0 kB
- Case9082Example/src/.../TestBean.java 1 kB
- Case9082Example/web/index.jsp 0.1 kB
- Case9082Example/web/main.jspx 2 kB
- Case9082Example/web/META-INF/context.xml 0.1 kB
- Case9082Example/web/.../faces-config.xml 0.6 kB
- Case9082Example/web/WEB-INF/web.xml 4 kB
-
- screenshot-01.png
- 173 kB
-
- screenshot-02.png
- 180 kB
Issue Links
- is duplicated by
-
ICE-6108 ValueChangeListener called twice when clicking on selectOneRadio label
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
onmouseup seems to behave as expected. onchange does not appear to be fired for the fieldset.
The recommendation is to change partialSubmit behavior for selectOneRadio to be triggered by onmouseup.
There is a comment above that the behavior is affected by the scope of the bean; this is likely a result of how two very rapid events affect the application – the root cause is that essentially duplicate events are generated by the browser for fieldset onclick.
Assigning to Ken to assign to component team if the partialSubmit trigger for selectOneRadio is to be changed.
Changed onclick to onmouseup as suggested. See screenshots 1 and 2 for before and after change.
Revision: 23029
Modified : /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/HtmlSelectOneRadio.java
Revision: 23031
Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/HtmlSelectOneRadio.java
This change seems related to a new regression failure:
New Failures:
ICE-751 load the application (problem reproducible on component-showcase selection page, selection is Menubar, selection in Media, selection in datapaginator, selection in splitpanel, selection in stackingPanel etc )
select a fruit- apple (selection is not displayed)
Now select another fruit -orange (apple is displayed instead of orange)
With the component-showcase / Table / Row selection example, when you click between modes, it takes two clicks to register. The first click does a submit, but the ice.event.target is not always set, although ice.event.captured is properly set. And the value for the radio is the previous value.
From the MSDN reference for mouse events, it says the onmouseup happens before onclick, so perhaps onclick has the actual value change.
Fixed by moving onclick handler from fieldset to radio buttons. No need to handle label element. Tested on IE 6, 7, 8 and FF.
From http://www.w3schools.com/tags/tag_label.asp :
The label element does not render as anything special for the user. However, it provides a usability improvement for mouse users, because if the user clicks on the text within the label element, it toggles the control.
Revision: 23052
Modified : /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/HtmlSelectOneRadio.java
Modified : /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/RadioRenderer.java
Modified : /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/SelectManyCheckboxListRenderer.java
Revision: 23053
Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/HtmlSelectOneRadio.java
Modified : /icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/RadioRenderer.java
Modified : /icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/SelectManyCheckboxListRenderer.java
This does not appear to be a framework issue. The following HTML example also displays two "click" alerts:
<html>
<body>
<fieldset onclick="alert('click');">
<input type="radio" id="coke" value="Coke" />
<label for="coke">coke</label>
<input id="sprite" type="radio" value="Sprite" />
<label for="sprite">sprite</label>
</fieldset>
</body>
</html>
If the onclick handler is applied to each label, however a single alert is displayed, so it may be desirable to modify the component renderer to apply the onclick attribute in this way.