[Opensource] ControllerResponse.getStyle()
Ben Switzer
ben at site85.com
Wed Nov 20 07:28:43 PST 2002
Hey Mike.
Finally had a chance to do some debugging. Setting up a couple of break
points and I found that setting the style in one state was not present
in the next state when I used the transition("whatEverState", param,
response) method.
Any thoughts on how I can keep that style variable set? I thought that
the response object in the first state was the same response object in
the state that I transitioned to.
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