Re: T5: Strategy for pages that edit beans

2008-04-03 Thread Andy Blower
I have encountered a similar issue, and the use of onPrepare() doesn't make sense to me. Surely there's no point persisting any fields and then resetting in onPrepare() is there? May as well just remove the @Persist. There must be something I'm missing here.. can anyone fill me in? Howard

Re: T5: Strategy for pages that edit beans

2008-04-03 Thread samlai
What about calling discardPersistentFieldChanges onCleanupRender? http://tapestry.apache.org/tapestry5/tapestry-core/guide/persist.html Clearing Persistent Fields If you reach a point where you know that all data for a page can be discarded, you can do exactly that. The method

Re: T5: Strategy for pages that edit beans

2008-04-03 Thread Petros Petrou
Hugo, Your UserPage.tml/UserPage.java is the view and your User POJO the model, right ? The way I see the probem is who ever (eg UserListPage, Register Link) needs to use the UserPage needs to pass in te POJO, otherwise the UserPage wont know what to display. What are the UseCases that you

Re: T5: Strategy for pages that edit beans

2008-01-21 Thread Hugo Palma
Cool, i didn't even know about that particular event. I just found that it's explained in the Input Validation section of the docs. Just thinking out loud, but wouldn't it be great if all the notifications a component can send were documented with the component documentation itself ? Maybe some

Re: T5: Strategy for pages that edit beans

2008-01-18 Thread Howard Lewis Ship
How about an onPrepare() event handler method to reset the _user field to a new User instance? On Jan 18, 2008 8:44 AM, Hugo Palma [EMAIL PROTECTED] wrote: Imagine the following use case: A page to register a new user. I have a User class so i'm all set. The page class looks something like: