javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2278

Inconsistent clientId when using composite components

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Incomplete
    • Affects Version/s: 2.1.4
    • Fix Version/s: None
    • Component/s: facelets
    • Labels:
      None

      Description

      In the attached you can find a running example of the bug, to reproduce the problem do the following:

      1. Create a composite component [mycc] with a composite attribute that will hold an action:

      <composite:interface>
      <composite:attribute name="action" targets="#

      {cc.clientId}:value"/>
      </composite:interface>

      <composite:implementation>
      <h1>clientId is: #{cc.clientId}

      </h1>
      <h:commandButton id="value" value="submit"/>
      </composite:implementation>

      2. Use the composite component and set an ID as follows:

      <h:form id="formID">
      <cc:mycc id="myID"/>
      </h:form>

      3. The first time you open the page the id is "myID" expected value is "formID:myID"

      4. submit the form by executing an action and the id changes and its "formID:myID:

      Note: if you don't specify an ID:

      <h:form id="formID">
      <cc:mycc/>
      </h:form>

      Then the page always show the generated id, for example j_idt6 and even if you submit the form it is always j_idt6. (there is no formID in it!)

      5. If you remove the "action" attribute from the composite component the ID is correct.

        Activity

        Hide
        Harsha Ramesh added a comment -

        I noticed that if I have a h:selectBooleanCheckBox within a composite component and if I set an id on the composite component, then the clientId does not include the formId. Will post more information as I debug it.

        Show
        Harsha Ramesh added a comment - I noticed that if I have a h:selectBooleanCheckBox within a composite component and if I set an id on the composite component, then the clientId does not include the formId. Will post more information as I debug it.
        Hide
        Manfred Riem added a comment -

        And where you able to debug it more?

        Show
        Manfred Riem added a comment - And where you able to debug it more?
        Hide
        Manfred Riem added a comment -

        Lowering priority because of submitter inactivity

        Show
        Manfred Riem added a comment - Lowering priority because of submitter inactivity
        Hide
        Manfred Riem added a comment -

        Lowering priority because of submitter no response

        Show
        Manfred Riem added a comment - Lowering priority because of submitter no response
        Hide
        Manfred Riem added a comment -

        Closing because of inactivity

        Show
        Manfred Riem added a comment - Closing because of inactivity

          People

          • Assignee:
            Unassigned
            Reporter:
            omar.kababji
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: