[Opensource] ControllerResponse.getStyle()

Michael Rimov rimovm at centercomp.com
Wed Nov 13 22:41:38 PST 2002


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









More information about the Opensource mailing list