struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken <ken.mcwilli...@aerose.com>
Subject Re: Control UI via GET parameters
Date Mon, 13 Sep 2010 20:46:37 GMT
Never mind, chain does exactly what I need.  I'm just going to require
they use 
a special action and supply the target action as a parameter and throw
the UI parameters and target action parameters on the url they'll
construct.

My issue was although realizing that chain would pass on the state of
the current 
action I thought for some reason that it would wipe out the rest of the
parameters
before passing it on to the next action... which isn't the case, and
gladly so as it does 
make much more sense this way.  Another case of... it was way easier
than I thought.

On Mon, 2010-09-13 at 12:40 -0600, Ken wrote:

> As a requirement I must be able to change the UI on a per request
> basis... a specific case would be including or omitting a left
> navigation bar. The parameters will always be passed with GET.  
> 
> Currently I am using Tiles and JSP's for composition.  
> 
> What I think would work is if I create a UI class and have an
> interceptor match all parameters of the pattern "UI.*" and  use this
> class as a partial model, which will be added to the request scope along
> with the action's model.  Then when the JSP's render they will consult
> the members of UI class as they would the members of the Action... and
> do what they're supposed to do, render the side bar, don't render the
> side bar...
> 
> For questions of you:
> Is this a reasonable way to approach this?  Is there already a way to do
> this with struts 2 or am I best writing my own interceptor?




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message