ICEfaces
  1. ICEfaces
  2. ICE-3114

UIViewRoot.findComponent returns null on Component ids within PanelTab

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Mac OSX
      Glassfish
      Java 5
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      By removing the extra "0:" from the component id findComponent returns sucessfully.

      String clientId = "FormId:tabs:0:ComponentId";
      clientId = clientId.replace("0:", "");
      UIComponent button = FacesContext.getCurrentInstance().getViewRoot().findComponent(clientId);
      Show
      By removing the extra "0:" from the component id findComponent returns sucessfully. String clientId = "FormId:tabs:0:ComponentId"; clientId = clientId.replace("0:", ""); UIComponent button = FacesContext.getCurrentInstance().getViewRoot().findComponent(clientId);

      Description

      Prior to 1.7.0 DR3 components within panelTabs were given ids based on the format FormId:tabs:ComponentId. This changed in DR3 to the following FormId:tabs:0:ComponentId. The issue is that when trying to access these components using FacesContext.getCurrentInstance().getViewRoot().findComponent() it returns null. It looks like the JSF Component Tree Ids are not the same as the Container Client Ids.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Chris Keefer
          • Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: