Incluido selector de tema de primefaces en pagina de bienvenida (home).
* El tema seleccionado se conserva durante la sesión. * Ya se muestran los iconos de primefaces para el tema seleccionado.
This commit is contained in:
@@ -10,12 +10,15 @@
|
||||
<ui:composition template="./header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:messages id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
|
||||
<p:panel header="Pagina principal">
|
||||
<p:panelGrid>
|
||||
<p:outputLabel for="basic" value="Cambio de tema" />
|
||||
<p:themeSwitcher id="basic" style="width:165px">
|
||||
<p:outputLabel for="selectorTema" value="Cambio de tema" />
|
||||
<p:themeSwitcher id="selectorTema" style="width:165px" value="#{sessionPreferences.currentTheme}">
|
||||
<f:selectItem itemLabel="Seleccione un tema" itemValue="" noSelectionOption="true" />
|
||||
<f:selectItems value="#{home.themes}" var="theme" itemLabel="#{theme.displayName}" itemValue="#{theme.name}" />
|
||||
<p:ajax listener="#{sessionPreferences.updateCurrentTheme}" />
|
||||
</p:themeSwitcher>
|
||||
</p:panelGrid>
|
||||
<h:panelGrid columns="2">
|
||||
@@ -31,6 +34,13 @@
|
||||
</h:panelGrid>
|
||||
</h:panelGroup>
|
||||
</p:panel>
|
||||
<p:panel>
|
||||
<h:panelGroup>
|
||||
<h:panelGrid columns="1">
|
||||
<p:commandButton value="Usar tema en este sesión" update="mesgs" action="#{sessionPreferences.updateCurrentTheme}" icon="pi pi-save" />
|
||||
</h:panelGrid>
|
||||
</h:panelGroup>
|
||||
</p:panel>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
|
||||
Reference in New Issue
Block a user