[Opensource] ControllerResponse.getStyle()

Ben Switzer ben at site85.com
Wed Nov 20 09:04:01 PST 2002


Taking a closer look at transition(newState, req, res, clear) shows me
that the style string should be propagated to the new response object.

What I did notice though, by placing a break point in the transition
method, the method gets called after I've changed to the new state.
What's up with that?

Best,
Ben

-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com] On Behalf Of Michael Rimov
Sent: Thursday, November 14, 2002 1:42 AM
To: opensource at jcorporate.com
Subject: Re: [Opensource] ControllerResponse.getStyle()


At 01:09 PM 11/13/2002 -0500, you wrote:
>Now on to my problem.  I have written a taglib that attempts to 
>retrieve the String style that's part of the response object.  When I 
>set the style with response.setStyle("green"); in my controller, 
>everything seems fine.  I can retrieve the String within the same 
>controller.  When I try to retrieve it from the tag, I get null.
>
>I've tried (ControllerResponse) 
>pageContext.getAttribute(Controller.RESPONSE_KEY,
>PageContext.REQUEST_SCOPE); and ControllerResponse myResponse = 
>ControllerUtils.getResponse(pageContext); to get a ControllerResponse 
>that'd have my String in it.  No luck.
>
>Is there something I'm missing, or am I not able to retrieve this 
>String like this.  Might there be another way to retrieve that String?

Ben,

I'm sorry, but ControllerUtils.getReponse(pageContext) SHOULD be getting

you a controller that you can get the style from.  If you run the App 
Server within a debugger [or attach to it, you can usually step debug
and 
evaluate variables.  I'd recommend examining the ControllerResponse
object 
you're getting from ControllerUtils to see if there's any clue as to
what's 
going on in there.  You certainly seem to be on the right path!

                                                 -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