What version are you using ? This will make a difference because prior to
v5.4 (I think ?) tapestry used to redirect after posing a form, so
persisting some fields were sometimes needed..

I usually have one @Persist'ed object being edited by my page. This object
had, within it, all the values that I need to be persisted. Of course you
may need more objects but that's how I find my self eventually doing it.
Probably because I've been using Tapestry for a specific application with
strict needs.

You know if use @Persist, then you persist your values in he user's session
but in this page only ? Using @SessionState has an implication which is
having the type of the persisted value, as the key to it. Meaning that if
you use @SessionState to persist a User object. If you use @SessionState
again in a different page to refer to another User object with whatever
name, you'll still be referring to the same object. Because the variable
name isn't the key, its it's type.

If you state a specific situation where you are facing issues, it may be
easier to get an answer.

*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana


On Thu, Aug 14, 2014 at 6:25 PM, squallmat . <squall...@gmail.com> wrote:

> Hi,
>
> each time on a submit failed the field values associated to a simple string
> persist without requiring @Persist annotation. But when you have any other
> type of fields, for example a list from an ajaxformloop, or a file
> selection, their values doesn't persist naturally, you have to use @Persist
> (and even the FLASH one doesn't work).
> That's really frustrating and cause you to have to manage some values in
> session that force you to use really weird tricks to manage them, for
> example when you come back later to a form you failed submit before and you
> see a part of old-entered values or fiels of an ajaxformloop still there.
>
> I would like to know if there is a method, a best practice, to handle the
> submitting persistence of values that are not link to simple String
> Property.
>
> Thanks in advance.
>

Reply via email to