[Opensource] How to transition from external state to jsp or another State?

Michael Rimov rimovm at centercomp.com
Sat Jul 20 03:09:09 PDT 2002


At 09:34 PM 7/16/2002 -0600, you wrote:
>I am having a problem transitioning from a external state to a jsp.
>This external state has code for creating Inputs (whether that matters
>or not).  The only way I see that you can do this is to create a "dummy"
>internal state in my controller which does nothing but transition to the
>jsp specified in my config.xml file.  Problem is that when you transiton
>from one State to another State the ControllerResponse gets cleared out.
>The code below is from the Controller.java, the true means clear out the
>response.
>
>protected void transition(String newState, ControllerRequest req,
>         ControllerResponse res) throws ControllerException,
>NonHandleableException {
>         transition(newState, req, res, true);
>     } /* transition(String, ControllerRequest, ControllerResponse) */Èy
>
>
>In my External state I am transitioning by doing
>
>transition(string, controllerrequest, controllerreqsonse
>
>
>What it kind of seems what I want to do is chain States together each
>time adding to the response.  How can I do this without having to
>modifiy the Expresso code and not having my response cleared out?

Kris, try constructing a Transition Object and then call:

Transition.transition(request, response, false);  (//false for NOT clearing)

Honestly, the Controller.transition() is more of a convienence method.  So 
let me know if you have problems with the Transition class version.

HTH!
                                                 -Mike




More information about the Opensource mailing list