Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.3, 1.6DR#1, 1.6DR#2
-
Fix Version/s: 1.7.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Any
-
ICEsoft Forum Reference:
Description
The select event of the RowSelector component is explicitly fired in the RowSelectorRenderer during the APPLY_REQUEST_VALUES phase (see code below). This means that during the UPDATE_MODEL_VALUES phase all backing bean changes made by the select listener will be overwritten.
Code:
if (rowSelector.getSelectionListener() != null) {
RowSelectorEvent evt = new RowSelectorEvent(rowSelector, rowIndex, b);
evt.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
rowSelector.queueEvent(evt);
}
The event should better by fired in the INVOKE_APPLICATION phase e.g.
Code:
if (rowSelector.getSelectionListener() != null) {
RowSelectorEvent evt = new RowSelectorEvent(rowSelector, rowIndex, b);
evt.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
rowSelector.queueEvent(evt);
}
A similar issue applies to the ValueChangeEvent fired by the SelectInputText component. For some reasons the event is fired in the PROCESS_VALIDATIONS phase witch leads to the same problem as described above. Changes made at the backing bean will be overwritten in the UPDATE_MODEL_VALUES phase.
Code:
if (rowSelector.getSelectionListener() != null) {
RowSelectorEvent evt = new RowSelectorEvent(rowSelector, rowIndex, b);
evt.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
rowSelector.queueEvent(evt);
}
The event should better by fired in the INVOKE_APPLICATION phase e.g.
Code:
if (rowSelector.getSelectionListener() != null) {
RowSelectorEvent evt = new RowSelectorEvent(rowSelector, rowIndex, b);
evt.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
rowSelector.queueEvent(evt);
}
A similar issue applies to the ValueChangeEvent fired by the SelectInputText component. For some reasons the event is fired in the PROCESS_VALIDATIONS phase witch leads to the same problem as described above. Changes made at the backing bean will be overwritten in the UPDATE_MODEL_VALUES phase.
The selectionListener is fired then, because we now skip all of the other phases, and go straight to render, so that no validations will be done.