I haven't looked into this stuff yet, but if I were dealing with it I'd probably just make a new ApplicationState class with a user property that I could set at will, and let Tapestry instantiate the ApplicationState whenever it wants to. Of course, once T5 supports ASO flags, you'd want to start using those in order to prevent unnecessary session creation.
On 3/16/07, Peter Beshai <[EMAIL PROTECTED]> wrote:
I am trying to store a user as an ASO. I am able to set the user, but when I want to log out, I figured the right way to do it was to just set the user ASO to null. I believe this works fine, just that now when I chcek to see if the user is null or not, as expected, the application state manager will attempt to create a new instance of it. I figured this wouldn't be a problem, since I could just override the configuration to have something like: public void contributeApplicationStateManager(MappedConfiguration<Class, ApplicationStateContribution> configuration) { ApplicationStateCreator<User> creator = new ApplicationStateCreator<User>() { public User create() { return null; } }; configuration.add(User.class, new ApplicationStateContribution("session", creator)); } however this didn't seem to make any difference. I still get a java.lang.InstantiationException. Is there something I am missing? -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo