Hi,

The PersistentFieldStrategy looks like it adresses some of my concerns.

I've had a look at the PersistentFieldStrategy but I'm having a little trouble wrapping my head around it.

the "void postChange(...)" method is straight forward, while the

"Collection<PersistentFieldChange> gatherFieldChanges(String pageName)"-method has thrown me somewhat off.

I reckon that the gatherFieldChanges is related to extracting the "persisted values" from the storage and pushing them back into the fields. (Even thought the javadocs are a little bit vague on this one ;)

If the gatherFieldChanges() is indeed supposed to help tapestry repopulate the fields i think I need a "half" PersistentFieldStrategy.

Feeding the fields from cookies and falling back to "normal" default values in case the cookie is empty/expired seems more like it belongs somewhere else. (I think it is possible to store all the cookiebacked values in a single string in the cookie (with pagename as key) but it doesn't really seem like an attractive solution).

I guess it would be possible to achieve the "automated" cookie persistence using a "half" PersistentFieldStrategy and a Mixin, but it doesn't really look like an elegant solution forcing people to markup their fields with several "dependant" annotations ;)

I'll probably dig around in the api some more, I might get lucky ;)

Other suggestions / pointers are most welcome - I may not be able to solve my problem, but I'm learning so many other interesting things while fooling around so it is not a total waste of time ;)

--
Chris



Filip S. Adamsen wrote:
Hi Chris,

I don't know if it's feasible, but perhaps a custom PersistentFieldStrategy that uses cookies would do the trick?

http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry/services/PersistentFieldStrategy.html

-Filip

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to