ICEfaces
  1. ICEfaces
  2. ICE-6398

CoreComponentUtils.findComponent(UIComponent, String) is bailing out too early, not recursing through the component tree enough to find a matching clientId

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Found with Liferay 6.0 + PortletFaces-Bridge 2.0.0-BETA3 but it's not portlet related.

      Description

      I have a JSF 2 Facelet composite component wrapping ice:dataTable like this:

      <my-comp:dataPaginator for=":myData" />
      <ice:dataTable id="myData">
      </ice:dataTable>

      The colon in front of :myData indicates that the search should start from the root of the tree. Sadly, CoreComponentUtils.findComponent(UIComponent, String) is bailing out too early, not recursing through the component tree enough to find a matching clientId.

      Here's a patch to fix:


      ===================================================================
      --- /icefaces-src/2.0-trunk/icefaces/compat/core/src/main/java/com/icesoft/util/CoreComponentUtils.java (revision 23550)
      +++ /icefaces-src/2.0-trunk/icefaces/compat/core/src/main/java/com/icesoft/util/CoreComponentUtils.java (working copy)
      @@ -162,6 +162,12 @@
                       component = child;
                       break;
                   }
      + if (component == null) {
      + component = findComponent(child, componentId);
      + if (component != null) {
      + break;
      + }
      + }
               }
               return component;
           }

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Neil Griffin
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: