Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Themes for my application

 
naveen joyce
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am developing an application in jsp for my client.My requirement is to apply 3 to 4 themes to my entire application.I need to include those themes in a select option so that whenever user selects any one of them that theme has to be applied.Can any one help me with the code in jsp???





Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the value of the dropdown to include a different set of css files to apply the different themes.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The major steps I can think of are:
1) Create a CSS file using the same id/class names for each theme.
2) Make sure your JSPs don't have any hard coded formatting info and only use the common id/class names in the theme css files
3) Build a way to let the user change themes.
4) Store the currently selected theme somewhere (maybe in the HttpSession - unless you need to remember it between visits in which case you need to store it in a cookie or the database)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic