You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Johnson nickel <sa...@elogic.co.in> on 2009/03/25 11:48:40 UTC

User changing theme in Struts 2

Hi all,
 
        Is there any default settings in struts2. where user can select
their own theme.
        My requirement is we have set buttons in our applications with
different colors.
     
        For,ex in orkut and gmail  change theme options the same way i want
to 
        implement in my application. I'm using struts 2 framework, if it any
template 
       based stuff, give me a suggestions 
-- 
View this message in context: http://www.nabble.com/User-changing-theme-in-Struts-2-tp22699112p22699112.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: User changing theme in Struts 2

Posted by Wes Wannemacher <we...@wantii.com>.
On Wed, Mar 25, 2009 at 2:56 PM, Martin Gainty <mg...@hotmail.com> wrote:
>
> could you explain how sitemesh installs to (presumably the) template folder?
> which sitemesh parameters are configurable?
>
> thanks,
> Martin

[snip]

>> >        My requirement is we have set buttons in our applications with
>> > different colors.
>> >
>> >        For,ex in orkut and gmail  change theme options the same way i want
>> > to
>> >        implement in my application. I'm using struts 2 framework, if it any
>> > template
>> >       based stuff, give me a suggestions

I read his request to mean that he wants for users to be able to
quickly change the overall look and feel of their app, as opposed to
being able to change from xhtml to simple theme in struts. In a case
like that, you can construct a link that will trigger sitemesh to
choose a different decorator. SiteMesh delegates the choice of
decorator to decorator mappers, and one if them, the
ParameterDecoratorMapper makes it pretty easy to allow users to change
their decorator.

As far as you question, sitemesh does not install to the template
folder... I figured that when the OP asked about templates, he wasn't
necessarily talking about Struts2 templates. If he was, I don't think
his problem is best solved with the Struts2 tag templating.

-Wes

-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: User changing theme in Struts 2

Posted by Martin Gainty <mg...@hotmail.com>.
could you explain how sitemesh installs to (presumably the) template folder?
which sitemesh parameters are configurable?

thanks,
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to  please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.






> Date: Wed, 25 Mar 2009 14:31:31 -0400
> Subject: Re: User changing theme in Struts 2
> From: wesw@wantii.com
> To: user@struts.apache.org
> 
> There are a number of different ways to do what you want. If you are
> just looking to be able to change a few buttons, I don't know if I
> would add the complexity of a templating framework. However, if you
> have the time and want to learn something that is likely to be very
> useful on future projects, then I would suggest learning how to use
> Sitemesh. Sitemesh can help you to create a fully themeable
> application.
> 
> http://www.opensymphony.com/sitemesh
> 
> There is a sitemesh plugin for struts2 and I've used it on a number of
> projects.
> 
> -Wes
> 
> On Wed, Mar 25, 2009 at 6:48 AM, Johnson nickel <sa...@elogic.co.in> wrote:
> >
> > Hi all,
> >
> >        Is there any default settings in struts2. where user can select
> > their own theme.
> >        My requirement is we have set buttons in our applications with
> > different colors.
> >
> >        For,ex in orkut and gmail  change theme options the same way i want
> > to
> >        implement in my application. I'm using struts 2 framework, if it any
> > template
> >       based stuff, give me a suggestions
> > --
> > View this message in context: http://www.nabble.com/User-changing-theme-in-Struts-2-tp22699112p22699112.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> Wes Wannemacher
> Author - Struts 2 In Practice
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Get quick access to your favorite MSN content with Internet Explorer 8. 
http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A

Re: User changing theme in Struts 2

Posted by Wes Wannemacher <we...@wantii.com>.
There are a number of different ways to do what you want. If you are
just looking to be able to change a few buttons, I don't know if I
would add the complexity of a templating framework. However, if you
have the time and want to learn something that is likely to be very
useful on future projects, then I would suggest learning how to use
Sitemesh. Sitemesh can help you to create a fully themeable
application.

http://www.opensymphony.com/sitemesh

There is a sitemesh plugin for struts2 and I've used it on a number of
projects.

-Wes

On Wed, Mar 25, 2009 at 6:48 AM, Johnson nickel <sa...@elogic.co.in> wrote:
>
> Hi all,
>
>        Is there any default settings in struts2. where user can select
> their own theme.
>        My requirement is we have set buttons in our applications with
> different colors.
>
>        For,ex in orkut and gmail  change theme options the same way i want
> to
>        implement in my application. I'm using struts 2 framework, if it any
> template
>       based stuff, give me a suggestions
> --
> View this message in context: http://www.nabble.com/User-changing-theme-in-Struts-2-tp22699112p22699112.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org