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

        Hide
        Hüseyin Aptioglu added a comment -

        this is problem for datatable too. which version this gonna be fixed ?

        Show
        Hüseyin Aptioglu added a comment - this is problem for datatable too. which version this gonna be fixed ?
        Hide
        Konstantin Rudy added a comment -

        The same for controls within ice:panelStack

        Show
        Konstantin Rudy added a comment - The same for controls within ice:panelStack
        Hide
        Mariusz Malinowski added a comment -

        Is there any other workaround for this issue? The workaround above doesn't work when you have nested dataTable with other components: formID:tableID:0:j_id46:0:but,
        formID:tableID:1:j_id46:0:but
        formID:tableID:2:j_id46:0:but

        Show
        Mariusz Malinowski added a comment - Is there any other workaround for this issue? The workaround above doesn't work when you have nested dataTable with other components: formID:tableID:0:j_id46:0:but, formID:tableID:1:j_id46:0:but formID:tableID:2:j_id46:0:but
        Hide
        Mark Collette added a comment -

        ICEfaces 1.8.x and before have D2DViewHandler.findComponent that should handle this, and ICEfaces 2+ has CoreComponentUtils.findComponent.

        Show
        Mark Collette added a comment - ICEfaces 1.8.x and before have D2DViewHandler.findComponent that should handle this, and ICEfaces 2+ has CoreComponentUtils.findComponent .
        Hide
        Ken Fyten added a comment -

        Marking as Closed / Invalid as part of legacy ICEfaces ICE / Compat component JIRA cleanup.

        Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf

        If the issue persists with the current ICEfaces release, please create a new JIRA for it.

        Show
        Ken Fyten added a comment - Marking as Closed / Invalid as part of legacy ICEfaces ICE / Compat component JIRA cleanup. Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf If the issue persists with the current ICEfaces release, please create a new JIRA for it.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: