You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Daniel Ray (JIRA)" <de...@myfaces.apache.org> on 2006/01/11 18:11:20 UTC

[jira] Created: (MYFACES-1020) Having multiple dataTables on a single page increments the rowCountVar incorrectly.

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


[jira] Commented: (MYFACES-1020) Having multiple dataTables on a single page increments the rowCountVar incorrectly.

Posted by "Daniel Ray (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1020?page=comments#action_12362715 ] 

Daniel Ray commented on MYFACES-1020:
-------------------------------------

My apologies. I could have sworn that I left sample code. I don't have the code on hand at the moment so I can't simply repost it. I had a total of four dataTables. Two dataTables existed in one panelGrid and the other two existed in another panelGrid (Side by side comparison). I did not manually set the ids either. I only noticed it after posting a problem when using a dataList http://issues.apache.org/jira/browse/MYFACES-1009 Code is posted there). The UI requirement has changed since I posted the bug and I am now using one dataTable and one dataList on the screen and don't have the problem anymore because I'm using the layout attribute of dataList to number the rows.

What I recall is that one dataTable would number 1 - 4 and the next dataTable would begin at 5. I also recall that if the second dataTable had multiple rows that the numbering would be the same and not incremented i.e. 5, 5, 5 and if I'm not mistaken I repopulated the two lists and saw the first table 1-4 and the second table start at 8 ???

Many thanks for digging deeper and finding the root problem. It may also explain the problem with http://issues.apache.org/jira/browse/MYFACES-814. I'm using MyEclipseIde plugin (4.1m2) on Linux and lose my patience easily when debugging taglibs (The plugin is much more robust on Windows). 

-Ray

> 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


[jira] Commented: (MYFACES-1020) Having multiple dataTables on a single page increments the rowCountVar incorrectly.

Posted by "Dennis Byrne (JIRA)" <de...@myfaces.apache.org>.
    [ 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