hi davor, you're right... "flash" will be an excpetion :)... the problem is that if you use components (libraries) of other teams or third party components that persist values in the session you still want to be able to use it in a conversation without changing the component.
making it easy to use for developers is also a goal. for example if you have fields with @Persist("conversation") and there is no active conversation context it should default to "session". my options as i see it right now are to replace the PersistentFieldManager service mit my own implementation or to refactor the PersistentFieldManager contribution to add injected PersistentFieldStrategy services instead of instantiating them with new. This would give me the freedom to add some decorators.... what do you think? g, kris "Davor Hrg" <[EMAIL PROTECTED]> 20.12.2007 09:25 Bitte antworten an "Tapestry users" <users@tapestry.apache.org> An "Tapestry users" <users@tapestry.apache.org> Kopie Thema Re: [T5] overriding persistence strategy of all fields to conversation strategy It seems you are trying too hard to fix user mistakes, a developer using the conversation persistence strategy must be aware of it and code accordingly. Forcing a specific persistence strategy can also cause undesired behaviours (for example error messages that use @Persist("flash")) these are just my thoughts on the subject, I haven't really looked deeper into persistence strategies... Davor Hrg On Dec 20, 2007 9:20 AM, Kristian Marinkovic <[EMAIL PROTECTED]> wrote: > hi filip, > > @Meta("tapestry.persistence-strategy=conversation") only works if the > @Persist annotation does not specify a strategy. I want to override the > strategy even if > the developer has set it to a specific strategy.... so whenever a > conversation is started > the values of all persistent fields will be saved in the conversation. And > i want to be able > to switch it on or off during runtime because it should be able to use the > same page with > or without a conversation context. > > I think i've too look harder :) ... If i succeed i'll put my solution > open-source somewhere... :) > > g, > kris > > > > > "Filip S. Adamsen" <[EMAIL PROTECTED]> > 19.12.2007 18:29 > Bitte antworten an > "Tapestry users" <users@tapestry.apache.org> > > > An > Tapestry users <users@tapestry.apache.org> > Kopie > > Thema > Re: [T5] overriding persistence strategy of all fields to conversation > strategy > > > > > > > > > Stick a @Meta("tapestry.persistence-strategy=conversation") annotation > on your page class? > > -Filip > > Kristian Marinkovic skrev: > > > > Hi all, > > > > i'm currently implementing a conversation module (similar to seam) by > > defining an own persistence strategy. i thought of an explicit and an > > implicit mode for conversations. The explicit mode requires that every > > persistent field within a conversation is annotated with > > @Persist("conversation"). the implicit mode would replace the given > > persistence strategy of any annotated field in a page with > "conversation". > > > > Can someone help me how to solve this problem? The > > PersistentFieldManager sets default strategies (@Meta) but cannot be > > overriden on a per page base. > > > > any suggestions? thanks > > > > g,kris > > > > > > --------------------------------------------------------------------- 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]