Whenever I click on a p:menuitem
and update the content of a layoutunit, the CSS style of the layoutunit disappears. Strangely, when I refresh the page, the style magically reappears. Can anyone explain why this happens?
<p:layout id="plantillaPrincipal" fullPage="true">
<p:layoutUnit id="cabe" position="north">
<h:form id="bmenu">
<p:menubar>
<p:menuitem id="inicio" value="INICIO" actionListener="#{controlMenu.mostrarOpcion()}" update=":container">
<f:setPropertyActionListener value="inicio" target="#{controlMenu.opcion}"/>
</p:menuitem>
<p:menuitem id="tarifas" value="TARIFAS" actionListener="#{controlMenu.mostrarOpcion()}" update=":container">
<f:setPropertyActionListener value="tarifas" target="#{controlMenu.opcion}"/>
</p:menuitem>
<p:menuitem id="tasas" value="TASAS" actionListener="#{controlMenu.mostrarOpcion()}" update=":container">
<f:setPropertyActionListener value="tasas" target="#{controlMenu.opcion}"/>
</p:menuitem>
<p:menuitem id="dudas" value="DUDAS" actionListener="#{controlMenu.mostrarOpcion()}" update=":container">
<f:setPropertyActionListener value="dudas" target="#{controlMenu.opcion}"/>
</p:menuitem>
<p:menuitem id="consultas" value="CONSULTAS" actionListener="#{controlMenu.mostrarOpcion()}" update=":container">
<f:setPropertyActionListener value="consultas" target="#{controlMenu.opcion}"/>
</p:menuitem>
</p:menubar>
</h:form>
</p:layoutUnit>
<p:layoutUnit id="container" position="center">
<h:form id="fcont">
<ui:insert name="panelInicio">...</ui:insert>
</h:form>
</p:layoutUnit>
This is the content of layoutunit that needs to be updated:
...This is the managed bean used for handling menu options:
...