ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-131

Allow the selectOneMenuColumn component to be able to change/update another component

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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

        Hide
        Brad Kroeger added a comment -

        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) {
        Employee newEmp = (Employee)newBean;
        if(newEmp.getSubDepartmentName().equals("Montreal"))

        { newEmp.setDepartmentName("Western"); }

        }

        Show
        Brad Kroeger added a comment - 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) { Employee newEmp = (Employee)newBean; if(newEmp.getSubDepartmentName().equals("Montreal")) { newEmp.setDepartmentName("Western"); } }

          People

          • Assignee:
            Brad Kroeger
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: