[
http://issues.apache.org/jira/browse/MYFACES-1020?page=comments#action_12362710
]
Dennis Byrne commented on MYFACES-1020:
---------------------------------------
Hello Daniel. Can you do a favor for me and post your tags? I also have a few
questions here.
1.) are you explicitly setting the id attribute of these two tags? If so, is
it the same value?
2.) are these two tags siblings (same parent tag) ? If so, what happens if you
make them non-siblings (just wrap one w/ a panelGroup).
I am able to reproduce your problem using the latest SVN but only under certain
circumstances.
First of all, the behavior that I am seeing is not restricted to rowCountVar .
I can get the entire dataModel ( for the value attribute) to be identical.
Furthermore, this is not just for dataTable, but really all attributes of all
tags - but only if they are siblings w/ the same expicitly set id. For
example, MyFaces will let me do the following ...
<h:outputText style="background-color: blue" id="foo" value="1" />
<h:outputText style="background-color: green" id="foo" value="2" />
This will *not* throw a unique id exception, both will be blue, and both will
render as "1". This is because UIComponentTag.findComponent() gets confused.
In this case, the second tag will find it's brother's UIComponent and a second
UIComponent will not be created ( see private findComponent() ). There is no
non-unique exception because there is no second UIComponent. You can even do
this ...
<h:outputText id="foo" value="1" />
<h:panelGrid id="foo">
<h:outputText value="bar" />
</h:panelGrid>
This will print two outputTexts, not an outputText and a panelGrid.
> Having multiple dataTables on a single page increments the rowCountVar
> incorrectly.
> -----------------------------------------------------------------------------------
>
> Key: MYFACES-1020
> URL: http://issues.apache.org/jira/browse/MYFACES-1020
> Project: MyFaces
> Type: Bug
> Components: Tomahawk
> Versions: 1.1.1
> Reporter: Daniel Ray
> Priority: Minor
>
> Having multiple dataTables on a single page increments the rowCountVar
> incorrectly. First dataTable increments as expected, but the second dataTable
> will pick up the count where the first dataTable left off. Ensuring unique
> rowCountVar names does not appear to help.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira