Tapestry
  1. Tapestry
  2. TAPESTRY-1054

DojoAjaxResponseBuilder will never render FormComponents

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.1
    • Component/s: Framework
    • Labels:
      None

      Description

      DojoAjaxResponseBuilder uses the client id of a component to determine whether or not to render it (see the contains method). Form components (children of AbstractFormComponent) will always have a null client id at this point & hence will never be rendered.

      The form components seem to have a null client id because AbstractFormComponent has an abstract setClientId method. This causes tapestry to add a generated getClientId method that overrides the AbstractComponent.getClientId method. If you look at a form component in a debugger you can see the extra $clientId member variables that have been added to the concrete class.

      The AbstractFormComponent setClientId method is only invoked by renderIdAttribute. Obviously this happens after the DojoAjaxResponseBuilder calls getClientId to determine whether the component should be rendered.

      I think this can be fixed by removing the AbstractFormComponent setClientId method & adding a protected setClientId method to AbstractComponent (that just sets the _clientId member).

      This will result in DojoAjaxResponseBuilder calling AbstractComponent.getClientId & being returned the bound id or the IComponent.getId. Either of which should allow it to properly determine whether the component is supposed to be rendered or not.

      1. TapBug-1054.zip
        16 kB
        Ben Sommerville

        Activity

        Ben Sommerville created issue -
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Assignee Jesse Kuhnert [ jkuhnert ]
        Ben Sommerville made changes -
        Attachment TapBug-1054.zip [ 12338649 ]
        Jesse Kuhnert made changes -
        Fix Version/s 4.1.1 [ 12312021 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Mark Thomas made changes -
        Workflow jira [ 12381464 ] Default workflow, editable Closed status [ 12568893 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568893 ] jira [ 12590161 ]

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Ben Sommerville
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development