Hi,
Well, due to the nature of the content being created/edited, it's
necessary to have the preview on the same page as the form. (This is for
a content management system.) I know about the two requests per page
behaviour of Tapestry, but consider that when a validation error occurs,
the user input is not discarded but saved by the ValidationTracker. I
guess I shouldn't take advantage of this, really, as it doesn't have
anything to do with validation.
And yeah, I'm persisting my objects. I just thought there might be an
easier way.
-Filip
Martin Kersten skrev:
Hi Fillip,
I would instantly go for a multi stage / multi-page formular.
Sounds that this preview is a real functionality and so should
be reflected by your component.
The lost of the data is caused by the two requests per response
behavior of tapestry. You may go with persist but I guess a
better way would be using the context during redirect.
Cheers,
Martin (Kersten)
-----Ursprüngliche Nachricht-----
Von: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 5. März 2008 20:40
An: Tapestry users
Betreff: T5: Preventing form success
Hi,
I have to show a preview of some content submitted through a form for
verification before it is added/updated in my database. What's the best way to
do this? Right now I set a flag in my onSelectedFromPreview method and check it
in my onSuccessFromAdd/Update method where I return null if the flag is set.
This, unfortunately, results in the user input being lost if I don't the object
I want to add/update.
Is there a way to prevent the form submit from succeeding without causing a
validation failure?
-Filip
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]