The default theme is passed to the page through a theme
variable. To change the theme for a page, use the set
tag to change the theme
variable. The variable can be changed using a static value or property.
Static Value
Change to the "simple" theme.
Code Block |
---|
<s:set |
...
name="theme" value=" |
...
'simple'" scope="page" /> |
...
|
Note |
---|
This will set the attribute 'theme' in the page scope, with the value of what that is returned by 'myTheme' in the stack, eg. the action class might have a getMyTheme method that return a String called simple, to indicate simple theme. |
Property
Change to the theme name indicated by the myTheme
property.
Code Block |
---|
<s:set |
...
name="theme" value=" |
...
%{myTheme}" scope="page" /> |
...
|
...
See also Selecting Themes