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

          Hide
          Deryk Sinotte added a comment -

          I did test against an inputText nested in a panelSeries in a portlet and, with the id provided by the PortletFaces UIViewRoot implementation, the findComponent algorithm did work and the "required" validation operated as expected.

          Show
          Deryk Sinotte added a comment - I did test against an inputText nested in a panelSeries in a portlet and, with the id provided by the PortletFaces UIViewRoot implementation, the findComponent algorithm did work and the "required" validation operated as expected.
          Hide
          Deryk Sinotte added a comment -

          The main research and documenation on the fix for this issue is in ICE-6659 so I'm linking to that case.

          Show
          Deryk Sinotte added a comment - The main research and documenation on the fix for this issue is in ICE-6659 so I'm linking to that case.
          Hide
          Neil Griffin added a comment -

          I tested the pf-directory-portlet (uses LiferayFaces, which in turn tests this bug) and the ICEfaces trunk revision 24185 (today). Unfortunately it still doesn't work. Assigning back to Deryk.

          Show
          Neil Griffin added a comment - I tested the pf-directory-portlet (uses LiferayFaces, which in turn tests this bug) and the ICEfaces trunk revision 24185 (today). Unfortunately it still doesn't work. Assigning back to Deryk.
          Hide
          Ted Goddard added a comment -

          Investigate whether a bean method can plug in an alternate findComponent strategy:

          <ice:label for="#

          {bean.find('comp27')}

          " />

          or perhaps a custom EL resolver.

          Show
          Ted Goddard added a comment - Investigate whether a bean method can plug in an alternate findComponent strategy: <ice:label for="# {bean.find('comp27')} " /> or perhaps a custom EL resolver.
          Hide
          Ken Fyten added a comment -

          Marking as Closed / Invalid as part of legacy ICEfaces 1.x, 2.x 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 1.x, 2.x 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:
              Neil Griffin
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: