Re: contrib:Table paging in @For loop

2006-07-21 Thread Mind Bridge

Hi,

The reason this happens is that Table stores its state in a persistent
property by default, which happens to be the same property when Table is
placed in a For loop.  

Please implement ITableSessionStoreManager and provide the
'tableSessionStoreManager' parameter to Table. That will allow you to
control where the table state is stored (i.e. a List where the index is the
iteration of the For).

Best regards,
-mb
-- 
View this message in context: 
http://www.nabble.com/contrib%3ATable-paging-in-%40For-loop-tf1976651.html#a5436353
Sent from the Tapestry - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: contrib:Table paging in @For loop

2006-07-21 Thread Steve Shucker
Thank you!  That was a trivially simple solution that solved 90% of my
issues.  I'd spent several hours digging into the table's internals before I
saw your email and fixed the paging in 10 minutes.  It was no problem to
make the objects I was iterating over implement ITableSessionStoreManager.
Is there someplace where this is documented?

One small note: even with your fix, the page counts on my (customized) pager
were displaying wrong.  I think this happened because TableFormPages caches
some of the page information in local private variables that are lazily
populated from the superclass.  I added a

span jwcid=@InvokeListener listener=listener:resetTable/

tag just before the table and implemented a custom listener to call
pageBeginRender on the pager.  It really should have been an initialize()
call, but that's a private method and pageBeginRender doesn't do anything
besides call initialize().

-Steve

-Original Message-
From: Mind Bridge [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 21, 2006 9:10 AM
To: users@tapestry.apache.org
Subject: Re: contrib:Table paging in @For loop


Hi,

The reason this happens is that Table stores its state in a persistent
property by default, which happens to be the same property when Table is
placed in a For loop.  

Please implement ITableSessionStoreManager and provide the
'tableSessionStoreManager' parameter to Table. That will allow you to
control where the table state is stored (i.e. a List where the index is the
iteration of the For).

Best regards,
-mb
-- 
View this message in context:
http://www.nabble.com/contrib%3ATable-paging-in-%40For-loop-tf1976651.html#a
5436353
Sent from the Tapestry - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



contrib:Table paging in @For loop

2006-07-20 Thread Steve Shucker
I'm having a problem with the contrib:Table component nested inside a @For
loop.  Essentially I'm rendering several lists of objects.  The initial
display is correct, but paging fails.  What I think is happening is that a
single @contrib:Table component is being reused with each iteration of the
loop and the paging listeners are firing against that single component
without regard to where I am in the @For loop.  My evidence is the hidden
form fields associated with paging state are being created for each
iteration of the loop, but always contain the same values.  Has anyone seen
behavior like this before or know of a workaround?

 

-Steve