On Thu, Apr 3, 2008 at 5:28 AM, Andy Blower <[EMAIL PROTECTED]> wrote:
>
> 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.
>
>
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 need
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 discardPersisten
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 Lewis
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
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 li
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:
@Meta("tapestry.persistence-strategy=flash") // because of the
validation tracker thing
public class Register {
@Persist
private User _user = new User();
public