struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken <ken.mcwilli...@aerose.com>
Subject Control UI via GET parameters
Date Mon, 13 Sep 2010 18:40:07 GMT
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