You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Pavitra Subramaniam (JIRA)" <de...@myfaces.apache.org> on 2010/12/31 03:20:45 UTC

[jira] Created: (TRINIDAD-1990) Trinidad Renderers should use the clientId of the component as the id of their root DOM element...

Trinidad Renderers should use the clientId of the component as the id of their root DOM element...
--------------------------------------------------------------------------------------------------

                 Key: TRINIDAD-1990
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1990
             Project: MyFaces Trinidad
          Issue Type: Bug
            Reporter: Pavitra Subramaniam


The basic problem is that our legacy PPR always used the Id of the first DOM element when determining  which DOM node should be replaced on the client (during partial update on client). By contrast, Mojarra's JSF 2.0 Ajax implementation always uses the id on the <update> element in the payload. If this does not match the root DOM node we are in trouble as the update fails. 

i. A temporary fix for this issue was made in https://issues.apache.org/jira/browse/TRINIDAD-1922. Specifically it relies on the clientId actually used by the renderer when building the partial response for the component. So the partial response for an input component with id="foo" currently looks like:

<partial-response>
  <changes>
    <update id="foo"><![CDATA[<table id="foo__xc_" class="af_inputText">..<input id="foo" ...>...]]/></update>
  </changes>
</partial-response>

ii. But the correct solution is to ensure that Trinidad renders "always set" the component's client Id on the root DOM element. So the partial response (update) for an input component will look like:

<partial-response>
  <changes>
    <update id="foo"><![CDATA[<table id="foo" class="af_inputText">...<input id="foo__ct_"...>...]]/></update>   
  </changes>
</partial-response>

NOTE: foo__ct_ is the id given to the actual content (DOM) 

The DOM change like above, impacts all input*/select* renderers as we need to,

  - re-wire JS script handlers for most input/select* components to use the new id
  - rewire <label> nodes to account for change in id
  - rewire message handlers to use the new id etc. 
  - test input/select* components in isolation and when used in table/panelFormLayout and panelLabelMessage




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.