myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Weber (JIRA)" <>
Subject [jira] [Commented] (TOBAGO-1736) Incorrectly rendered component ID
Date Sat, 29 Apr 2017 08:19:04 GMT


Volker Weber commented on TOBAGO-1736:

Hi David,

i don't think this is a tobago issue, nor it can be anything done inside tobago to solve this.

The problem here is the c:forEach loop with dynamic changed content between rerendering the
same view.

Let me try to explain the behavior:
The facelet engine is reusing the existing components as long as the component matches the
required types.
The ValueExpression for the id is resolved on component creation and set into the Component
When rerendering the same view with another order of the forEach values, the component tree
is the same
as before, just the values of the ValueExpressions are changed. The ids of the components
are rendered in the old order,
but the values in the new order.

Maybe someone with better knowledge of the spec ([~lu4242] ?) could say if this behavior is
a bug or required by the spec.


> Incorrectly rendered component ID
> ---------------------------------
>                 Key: TOBAGO-1736
>                 URL:
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Facelets
>    Affects Versions: 2.0.10
>         Environment: Unix
>            Reporter: David Crhonek
>         Attachments: uploadBox.xhtml
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> When dynamically creating UI component ID, the rendered ID is often incorrect. This appears
to be random, but happens very often, multiple times on a page. When the same value is put
in ID and in tip (title), the rendered title is ALWAYS correct, however the rendered ID value
is often INCORRECT.
> In the attached example, #{titleVar} is put to ID as well as to tip. This is an example
of an incorrect output:
> <button type="button" name="page:details_upload:CASV3_C_B_TODAY" id="page:details_upload:CASV3_C_B_TODAY"
title="NTC_A_B_TODAY" data-tobago-commands="{&quot;click&quot;:{&quot;partially&quot;:&quot;page:details_upload:popup-Upload-TODAY-1&quot;,&quot;popup&quot;:{&quot;command&quot;:&quot;open&quot;}}}"
href="#" data-tobago-style="{&quot;width&quot;:&quot;59px&quot;,&quot;height&quot;:&quot;14px&quot;,&quot;top&quot;:&quot;52px&quot;,&quot;left&quot;:&quot;677px&quot;,&quot;position&quot;:&quot;absolute&quot;}"
class="tobago-button" style="width: 59px; height: 14px; top: 52px; left: 677px; position:
> ID and Title should be the same, but they are not. The expected value is NTC_A_B_TODAY

This message was sent by Atlassian JIRA

View raw message