Im using Tapestry 4.1.5, Tomcat 6.0.13 and Java build diablo-1.5.0-b01. My
issue is that I have a page where I want to allow a user to configure a
default 'bar' for each 'foo' the user has. The user's 'foo's and 'bar's are
read from the DB using a service layer. I loop around the foo's with a @For
and create a @PropertySelector with all the bar's in it for each foo.
Everything works. The problem is that I want to limit the number of reads
from the database AND I want to clear the instance variables when the page
is done. 

I have tried many permutations including static lists (where I get my read
once from the DB, but the page doesn't ever refresh when its reloaded (for
instance adding new bar's and they never show up). I have tried declaring
everything abstract and letting Tapestry allocate everything but that causes
way too many DB reads. I have also tried the latest (represented in the
code) with pageAttached and pageDetached. The problem is the pageDetached
comes too often and too early, as soon as the page is rendered, the detached
gets called so I cant clean up the instance variables or they wont be
available when the 'submit' is hit. Also Im not sure detach ever gets called
if you click 'back.'

While Im waiting I will try cleaning things up in the 'submit' and 'cancel'
and then calling forgetPage() but I dont think that will have any effect if
I click 'back' or 'reset' back to the home page. 

ManageFoos.html
http://pastebin.com/m38cb7caf

ManageFoos.java
http://pastebin.com/me7dc317
-- 
View this message in context: 
http://www.nabble.com/-T4--Problem-with-multiple-PropertySelectors-and-persistence-tp21823085p21823085.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to