Long experience has shown that these objects tend to be singletons. It's generally things like the user's identity or account information or shopping basket.
Earlier versions of Tapestry uses a mechanism similar to what you have. It was always a lot of unwanted configuration. This streamlined approach means no configuration: just slap @ApplicationState on a field and you are done. On Jan 17, 2008 9:02 AM, kwaclaw <[EMAIL PROTECTED]> wrote: > > I am new to Tapestry 5 (never looked at previous versions). > Forgive my possibly naive question: > > It seems ApplicationState annotated fields are keyed by class, so this > really supports > only one instance (singleton) per class (and per scope, usually session). > > Would it not be useful to be able to pass a name parameter to the > annotation, > so that different instances of the same class/type could be stored? Like: > > @ApplicationState("state1") > private MyState state1; > > @ApplicationState("state2") > private MyState state2; > > > Karl > -- > View this message in context: > http://www.nabble.com/%40ApplicationState-fields-keyed-by-class%2C-not-instance-tp14924062p14924062.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]