You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Adam Jenkins <ma...@adamjenkins.net> on 2005/07/28 22:28:10 UTC

datagrid row incrementing my ids?

<netui-data:row> keeps incrementing my tagId...is there any way to stop
it?

code:
<netui-data:rows renderRow="false">	
<netui-data:row tagId="${container.item.id}_row">
<netui-data:templateCell cellStyle="width:24%;text-align:center"
cellAlign="center">...

output:

<tr id="2_row1" class="datagrid-odd">
<td class="datagrid" align="center" style="width:24%;text-align:center">

The reason i'm using 'row' instead of just 'rows' is because I have to
render two <tr> elements for every item in my collection...I'm guessing
this is the correct way to accomplish that...please let me know if there's a better way

Cheers
Adam


Re: datagrid row incrementing my ids?

Posted by Eddie ONeil <ek...@gmail.com>.
Adam--

  Hey; what exactly is the <tr> output on the consecutive table rows? 
I've tried this with something like:

  <netui-data:rows renderRow="false">
    <netui-data:row tagId="foo">
        ...
    </netui-data:row>
    <netui-data:row tagId="bar">
        ...
    </netui-data:row>
  </netui-data:rows>

and end up with something like this rendered HTML:

    <tr id="foo0"> ... </tr>
    <tr id="bar0"> ... </tr>
    <tr id="foo1"> ... </tr>
    <tr id="bar1"> ... </tr>
    ...

The addition of an index to the identifier provided in the "tagId"
attribute is done to prevent writing duplicate identifiers into the
HTML, which is illegal.  What are you interested in seeing here? 
Would something like the JSP snippet above solve your problem?

Eddie



On 7/28/05, Adam Jenkins <ma...@adamjenkins.net> wrote:
> <netui-data:row> keeps incrementing my tagId...is there any way to stop
> it?
> 
> code:
> <netui-data:rows renderRow="false">
> <netui-data:row tagId="${container.item.id}_row">
> <netui-data:templateCell cellStyle="width:24%;text-align:center"
> cellAlign="center">...
> 
> output:
> 
> <tr id="2_row1" class="datagrid-odd">
> <td class="datagrid" align="center" style="width:24%;text-align:center">
> 
> The reason i'm using 'row' instead of just 'rows' is because I have to
> render two <tr> elements for every item in my collection...I'm guessing
> this is the correct way to accomplish that...please let me know if there's a better way
> 
> Cheers
> Adam
> 
>