Hi,
I need to select a default theme that appears when loading page
for example:
<p:themeSwitcher value="pepper-grinder" style="width:165px" id="defaultSwitcher" >
<f:selectItems value="#{bean.themes}"/>
</p:themeSwitche>
and default to that page "pepper-grinder" will be the theme
Thank you very much for your help..!
Theme page default <p:themeSwitcher>
you can create bean ( for example )
Put there
When you call getter
and in your
Code: Select all
@ManagedBean
@RequestScoped
public class ThemeSwitcherBean
Code: Select all
private String theme;
Code: Select all
public String getTheme() {
// maybe some other logic, logic from db etc.
if (theme == null)
theme = "cupertino";
Code: Select all
<p:themeSwitcher value="#{themeSwitcherBean.theme}" style="width:165px" id="defaultSwitcher" >
<f:selectItems value="#{bean.themes}"/> <- put this also in themeSwitcherBean ?
</p:themeSwitche>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 45 guests