Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Theme change from struts.properties

 
paddy Mahadeva Iyer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I tried to set my struts 2 theme to simple in "struts.properties" file. But it is not reflecting when the application is deployed. But if i use the theme attribute on my form tag it is working properly. But in that case i am not able to read values from the packages.properties. Are these related issues?

Suggestions for working around this would be highly appreciated.

Thanks in advance
Paddy
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "simple" theme form tags render *only* the input elements, not associated labels.

If that's what you mean by not being able to read from package.properties then yes, they're related. If you mean that you can't access *anything* from package.properties, then no, it's not related.
 
paddy Mahadeva Iyer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its the first one! I am not able to read from it.

But that's ok. I have worked around it using "<s:text>" tag.

But the more important concern right now for me is that. I am not able to set the theme from the "struts.properties" file. When I set "ui.theme" to simple, it does not work. It takes the default theme ( i guess xhtml). How can i work around that?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The correct property name is "struts.ui.theme".
 
paddy Mahadeva Iyer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i have used "struts.ui.theme" only.

Is there any other configuration necessary?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not that I know of, although the preferred mechanism is to use XML-based constant configuration.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic