Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.8.2.GA_P01
-
Fix Version/s: 1.8.2.GA_P02
-
Component/s: Facelet Components
-
Labels:None
-
Environment:All
Description
Feature Request: The standard selectOneMenu component has the capability to update another menu or other component depending on its selection. Currenly this is not possible with the selectOneMenuColumn component because the valueChangeEvent is not exposed to the user. The use of the setEventPhase would also be required so that the update is show to the user without the need for a refresh. This could also be reviewed for other selection composite components.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
The way the component is designed "Edits are done in a safe 'edit space' and the direct objects are untouched until the data is saved". This means that the JSF lifecycle does not execute until the save button is pressed.
The way to make this change with the existing component is to implement the rowUpdated method in the class that implements IEditableTableEventListener:
In this example tested in the composite-comps-showcase, if we want the selection of "Montreal" in one selectOneMenu to change the value of another selectOneMenu, this is how it would be done:
public void rowUpdated(Object oldBean, Object newBean) {
{ newEmp.setDepartmentName("Western"); }Employee newEmp = (Employee)newBean;
if(newEmp.getSubDepartmentName().equals("Montreal"))
}