Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Invalid
-
Affects Version/s: EE-3.3.0.GA_P03
-
Fix Version/s: EE-3.3.0.GA_P04
-
Component/s: ICE-Components
-
Labels:None
-
Environment:jsf 2 icefaces 3.3 compat
-
Assignee Priority:P1
-
Support Case References:Support Case 13463:- https://icesoft.my.salesforce.com/5007000001G9u4r?srPos=0&srKp=500
Description
see the attached sample application. When compat components are on the same form and both have partialSubmit="true", the valueChangeListener is firing when it is not the capturing component.
In the example:
<ice:selectOneMenu id="menu1" value="#{testBean.menuValue}"
valueChangeListener="#{testBean.valueChangeMethod}"
partialSubmit="true">
<f:selectItem itemLabel="Value 1" itemValue="1"/>
<f:selectItem itemLabel="Value 2" itemValue="2"/>
<f:selectItem itemLabel="Value 3" itemValue="3"/>
</ice:selectOneMenu>
<ice:selectBooleanCheckbox id="chk1" value="#{testBean.radioBool}" partialSubmit="true">
</ice:selectBooleanCheckbox>
...
are in the same form. On initial page load, the submit of the checkbox will fire the valueChangeListener of the selectOneMenu (and it should not).
The customer is stating that this is happening quite often for them (the test case, it only happens on page load), but hopefully fixing this test case will also fix the customer's issue.
In the example:
<ice:selectOneMenu id="menu1" value="#{testBean.menuValue}"
valueChangeListener="#{testBean.valueChangeMethod}"
partialSubmit="true">
<f:selectItem itemLabel="Value 1" itemValue="1"/>
<f:selectItem itemLabel="Value 2" itemValue="2"/>
<f:selectItem itemLabel="Value 3" itemValue="3"/>
</ice:selectOneMenu>
<ice:selectBooleanCheckbox id="chk1" value="#{testBean.radioBool}" partialSubmit="true">
</ice:selectBooleanCheckbox>
...
are in the same form. On initial page load, the submit of the checkbox will fire the valueChangeListener of the selectOneMenu (and it should not).
The customer is stating that this is happening quite often for them (the test case, it only happens on page load), but hopefully fixing this test case will also fix the customer's issue.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
The valueChangeListener is invoked because the selected value on the server is null which is not equal to the value of "1" sent by the partial submit. When ice:selectOneMenu's validator runs it detect the difference and queues a value change event.
To fix this the TestBean constructor should initialise the selected value to match the one selected by default in the browser: