[Opensource] overriding controllers - can't change initial st ate

Mike Traum mtraum at cirnetwork.org
Thu Dec 5 12:42:13 PST 2002


I changed my code so can't run it through the debugger without recreating
the situation, but here's what I'm gathering:
Controller.setInitialState() (line 2187) will only set the initial state on
this condition:
initialStates.get(getClass().getName()) == null

Unless I'm mistaken, that's the problem. I'm not quite sure what getClass()
returns for a subclass (if it's the parent or not), but either way the
getInitialState() uses the same method to retrieve the initial state, so
either the problem is that both are stored and the subclassed is always
retrieved or only one is stored. I doubt that made any sense to anyone but
myself - it's been a long week.

mike

-----Original Message-----
From: Michael Rimov [mailto:rimovm at centercomp.com]
Sent: Thursday, December 05, 2002 1:24 PM
To: opensource at jcorporate.com
Subject: Re: [Opensource] overriding controllers - can't change initial
state


At 03:25 PM 12/4/2002 -0600, you wrote:
>I just wrote my own registration controller. I was going to override 
>expresso's, but it doesn't seem to me that you can define a new initial
state.

Hi Mike,

You should be able to.  Since initialization goes in the order of:

         Your class ->  call super() -> Back to your class

In your constructor, if you call setInitialState() AGAIN, it should 
override what was done in the base class.  Let me know if it is throwing an 
exception... it shouldn't.

HTH!
                                                 -Mike


_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/



More information about the Opensource mailing list