You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by peter ricke <in...@peter-ricke.de> on 2010/10/04 16:55:36 UTC

[t5] Problems with grid in a loop

  Hi,
On a page i have a grid in a loop. When inPlace="true" clicking on a 
grids Pager-link always
results in displaying the content of the last edited grid on the page, 
so i`m not able to move through the pages of the grids, and all grids 
display same information
after clicking eachs grid-page-link.
I assign unique id`s to each grid in the loop, but a look at the 
generated html reveals, that the id are assigned to the table of the 
grid, not to
the sourroundig div.

Is there a way to use grids in loops while inPlace=true?
Thanks
Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [t5] Problems with grid in a loop

Posted by forum <fo...@gmail.com>.
I am also same kind of the issue let me explain 

Currently we are working on a report generation. We are facing an issue with
pagination using tapestry grid component.

For a given date search criteria (1-Nov-2010 to 2-Nov-2010). We are using a
tapestry “Loop” component to iterate over the date range list, which
internally contains the list of transactions per day that is being displayed
using the grid component.

Here the grid component is configured with “rowsPerPage=5” for the
pagination.

• Assume for 1-Nov-2010, there are 11 rows, i.e., displays [1, 2 , 3]
pagination links. Here the pagination works as expected.

• For 2-Nov-2010, there are 21 rows, i.e., displays [1, 2, 3, 4, 5]
pagination links. But here on click of pagination link 4 and 5, it doesn’t
list out the next set of rows.

In the initial investigation we observed that first grid pagination always
takes the precedence over the other grids pagination.

Would like to know, if there any other configuration available to resolve
this issue or is there any any other approach/solution is there to overcome
this problem.



<t:loop source="reports" value="report" encoder="reportEncoder">
<t:grid source="report.reportObjects" row="reportObject" lean="true"
inPlace="false" rowsPerPage="5" pagerPosition="bottom" class="decora"
include="name", "age", "country", "city">
<t:parameter name="nameCell">${name}</t:parameter>
<t:parameter name="countryCell">${country}</t:parameter>
<t:parameter name="cityCell">${city}</t:parameter>
</t:grid>
</t:loop>

-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/t5-Problems-with-grid-in-a-loop-tp3173508p3288953.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [t5] Problems with grid in a loop

Posted by peter ricke <in...@peter-ricke.de>.
  Problem was due to the static -structure of tapestry.
When re-rendering after a pager-link was pressed , the grid-source was 
always the source of last rendered grid.
Solved by decorating Grid so that onInPlaceUpdate() triggers an event 
handled by the embedding component  which thereby
ensures that the right "source" is used for re-rendering the grid.

I guess that there are better solutions for this, any recommendation 
appreciated
Thanks
Peter


>  Hi,
> On a page i have a grid in a loop. When inPlace="true" clicking on a 
> grids Pager-link always
> results in displaying the content of the last edited grid on the page, 
> so i`m not able to move through the pages of the grids, and all grids 
> display same information
> after clicking eachs grid-page-link.
> I assign unique id`s to each grid in the loop, but a look at the 
> generated html reveals, that the id are assigned to the table of the 
> grid, not to
> the sourroundig div.
>
> Is there a way to use grids in loops while inPlace=true?
> Thanks
> Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org