You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Germán Castro <ge...@nuwit.com> on 2009/05/15 23:15:24 UTC
Multiple set of templates
Hi,
I'm new in struts and i'm searching if I can do something that i need using
struts 2.
The situation is that I have 2 or more "packages" of templates, in example:
1 template sized to 320x200 and other in 1280x756. All in the same
application, the only diference is that diferent clients can see the same
page in a diferent dispositions.
Then, how can I set dynamically the template directory? or an equivalent way
where I don't have to program the N templates in the actions. The idea is
that the multiple templates to be as transparent as posible for the
controller and data layers.
Also I would prefer have independant templates for each size instead of use
conditional displays in the same template.
Thanks in advance.
Germán
Re: Multiple set of templates
Posted by Germán Castro <ge...@nuwit.com>.
Hi,
I found this
<s:set name="templateSuffix" value="'ftk'" />
or
<s:set name="templateDir" value="'template'" scope="page" />
Is it posible do the same but with java code in a filter or controller?
Thanks
Germán
On Fri, May 15, 2009 at 5:15 PM, Germán Castro <ge...@nuwit.com>wrote:
> Hi,
>
> I'm new in struts and i'm searching if I can do something that i need using
> struts 2.
>
> The situation is that I have 2 or more "packages" of templates, in example:
> 1 template sized to 320x200 and other in 1280x756. All in the same
> application, the only diference is that diferent clients can see the same
> page in a diferent dispositions.
>
> Then, how can I set dynamically the template directory? or an equivalent
> way where I don't have to program the N templates in the actions. The idea
> is that the multiple templates to be as transparent as posible for the
> controller and data layers.
>
> Also I would prefer have independant templates for each size instead of use
> conditional displays in the same template.
>
> Thanks in advance.
>
> Germán
>
>