That is cool! There is also some theme support/switching support built into Spring MVC. There may be an offchance it can be used outside of MVC?
Mike. On 8/10/07, Matt Raible <[EMAIL PROTECTED]> wrote: > > For the record, I believe the theme selection logic can be made much > better. I really like using a "stylesheet switcher" which uses > client-side logic and cookies to switch themes. > > For an example, go to http://demo.raibledesigns.com/appfuse-light and > click on the black and white image on the bottom right. > > The Stylesheet Switcher in AppFuse Light has the following at its > beginning: > > /* > -------------------------------------------------------------------------------- > * Stylesheets Switcher > * Version 0.2 > * Author: Martin Ström, [martin at burnfield dot com] > * Based on a script by Paul Sowden ( > http://alistapart.com/stories/alternate) > * Requires Prototype JavaScript library (http://prototype.conio.net/) > * > -------------------------------------------------------------------------------- > */ > > I think the problem with incorporating a similar system in AppFuse is > merely setting up the "choose your theme" logic. > > Matt > > On 8/10/07, Michael Horwitz <[EMAIL PROTECTED]> wrote: > > AppFuse currently only allows the admin to change the theme, and the > change > > automatically applies to all users accessing the site. If you want per > user > > themes you will need to change the following: > > > > 1) The theme selection is stored in the ServletContext in the config > object. > > You will need to change this so that it is stored in the session or > request. > > 2) You will need to change the LocaleFilter to allow theme changes for > > non-admin users and change the location the theme is stored. > > 3) You need to look at the StartupFilter which is responsible for > placing > > the initial theme into the context. > > 4) You will need to change the SiteMesh decorator default.jsp to obtain > the > > theme from the correct place. > > 5) You will need to decide if/how you want to store the user's theme > > prefence. > > > > Mike. > > > > > > On 8/10/07, Imran Amajd <[EMAIL PROTECTED] > wrote: > > > > > > > Hello Michael, Thanks for quick reply. your idea for admin user worked > for > > me. I was trying with ROLE_USER role, and it wasn't working. when i > tried it > > with ROLE_ADMIN role. it did. can we give user the choice to chance the > > theme upon its own choice? still only admin can change over all theme of > the > > site and user can experience the change, if i want every user to select > > theme of its own choice, what will i need to do? Thanks again. -Imran > > > > > > > > > Michael Horwitz wrote: > > > What happens when you try? And are you logged in as a user with admin > role > > when you try? On 8/9/07, Imran Amajd wrote: > > Hello! I am using > > appfuse-struts application. I have a problem > implementing dynamic > themes > > ['simplicity','andreas01','puzzlewithstyle'] > support in > > application. when i use following > > > http://demo.appfuse.org/appfuse-jsf/mainMenu.html > > with > ?theme=puzzlewithstyle it works.. but when i append same > parameter in > > my > application, it does not. I have above mention themes in my > application > > src. > can you help me figure out the problem. what configuration do i > need > > to look > for? my web.xml have following parameter already csstheme > > simplicity > Looking for your kind reply. Thanks. -Imran > > Michael > Horwitz > > wrote: > Several themes ship with AppFuse - the ones you see on the demo > > site are > also available within your application. To switch between > themes > > > dynamically, log in to your site as admin and append the following to > the > > > URL: ?theme= Note that changing it as the admin changes it for > everyone > > who > accesses the site. To change the default theme, set the csstheme > > context > parameter in web.xml. By default it is set to: csstheme > simplicity > > The > following themes ship with AppFuse: 1) simplicity (the default > theme) > > 2) > andreas01 (the one you saw on the demo site) 3) puzzlewithstyle I > would > > > suggest using the existing style sheets to see examples of how the > various > > > themes lay out the menus - if you have done a war:inplace or > > > appfuse:full-source on your project, you should have all the style files > > > > available. Mike On 8/7/07, PeteTh wrote: > > > Hi there, > > I have a > > > question about the particular Struts Menu used in the Demo at :- > > > > > http://demo.appfuse.org/appfuse-spring/mainMenu.html > > > > Where can I find > the source code and configuration for this Side > Nav > > Bar > Menu ? > When I > create an Appfuse SpringMVC or Struts Archetype > I > > always get a > Tabbed > > Menu. > Also the Demos on Struts Menu site are > not > > quite like this. > > If I > want to replicate this menu, what css files > do I > > need, and Struts > Menu > > configuration (both jsp and menu-config.xml) > > etc. > > Many thanks. > Pete > > > -- > View this message in context: > > > > > > http://www.nabble.com/Struts-Menu-Details-for-http%3A--demo.appfuse.org-appfuse-spring-mainMenu.html-tf4231344s2369.html#a12038023 > > > > Sent from the AppFuse - User mailing list archive at > Nabble.com . > > > > > > --------------------------------------------------------------------- > > > To > unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For > additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > ------------------------------ > View this message in context: Re: > Struts > > Menu Details for > > > http://demo.appfuse.org/appfuse-spring/mainMenu.html > > > Sent from the AppFuse - User mailing list archiveat > Nabble.com . > > > > > > > > > ________________________________ > > View this message in context: Re: Struts Menu Details for > > http://demo.appfuse.org/appfuse-spring/mainMenu.html > > > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > > > > > > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
