|
PanelNavigation2 not saving state Hi, I'm using panelNavigation2 for navigation stuff. Each
commandNavigation2 points to different navigation-rules in the faces-config. If I use the menu for navigate it works properly faces keeps the actual
view and panelNavigation2 keeps the current state (all nodes which should stay
open, are open, those not, are not), so far - that's fine. But the problem
comes when I want do submit (clicking an "Search" button in a form)
or if I need to navigate without using the menu (typically "Next"
button within a page). In these cases, unfortunately panelNavigation2 loses its
state and all nodes which need to stay opened are closed. First I had the menu in another jsp and I used <jsp:include
page="../comun/menu.jsp"/>. I thought this could be the problem so
I put the panelNavigation2 Tag directly in the main template. Then I had a look
into the web.xml and found the part: <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> <description> State
saving method: "client" or "server" (= default) See
JSF Specification 2.5.2 </description> </context-param> as it should be. But it still doesn't work correctly. Anyone an idea of what I might have missed, or done wrong? This is an example of two nodes of the menu and the buttons
"Next" and "Search" I mentioned above: ************************ MENU ************************ <h:panelGrid> <t:panelNavigation2
align="left" width="182px" layout="table" id="nav" itemClass="navitem"
style =
"list-style: none;list-style-position: outside; padding-left:
0px;margin-left:0px;" bgcolor="#E6E6E6" styleClass =
"menu_LEFT_TOP_RIGHT_BOTTOM" activeItemClass="navitem_active"
openItemClass="navitem_open"
style =
"list-style-type:circle"> <t:commandNavigation2
actionListener="#{menuBean.limpiarSesion}"
action=""
rendered="#{menuBean.lMenuJSF[0].codPermiso == \"1\"}"
id="nav_1" value="#{menuBean.lMenuJSF[0].literal}"> <t:commandNavigation2
actionListener="#{menuBean.limpiarSesion}"
action=""
rendered="#{menuBean.lMenuJSF[1].codPermiso == \"1\"}"
id="nav_1_1" value="#{menuBean.lMenuJSF[1].literal}"/> <t:commandNavigation2
actionListener="#{menuBean.limpiarSesion}"
action=""
rendered="#{menuBean.lMenuJSF[2].codPermiso == \"1\"}"
id="nav_1_2" value="#{menuBean.lMenuJSF[2].literal}"/> <t:commandNavigation2
actionListener="#{menuBean.limpiarSesion}" action=""
rendered="#{menuBean.lMenuJSF[3].codPermiso == \"1\"}"
id="nav_1_3" value="#{menuBean.lMenuJSF[3].literal}"/> </t:commandNavigation2> <h:graphicImage
value="../../imagenes/guiones_separacion.gif" width="140"
height="1" rendered="#{menuBean.lMenuJSF[4].codPermiso ==
\"1\"}" /> <t:commandNavigation2
actionListener="#{menuBean.limpiarSesion}"
action=""
rendered="#{menuBean.lMenuJSF[4].codPermiso == \"1\"}"
id="nav_2" value="#{menuBean.lMenuJSF[4].literal}"> <t:commandNavigation2
actionListener="#{menuBean.limpiarSesion}"
action=""
rendered="#{menuBean.lMenuJSF[5].codPermiso == \"1\"}"
id="nav_2_1" value="#{menuBean.lMenuJSF[5].literal}"/> <t:commandNavigation2
actionListener="#{menuBean.limpiarSesion}"
action=""
rendered="#{menuBean.lMenuJSF[6].codPermiso ==
\"1\"}"id="nav_2_2"
value="#{menuBean.lMenuJSF[6].literal}"/> <t:commandNavigation2
actionListener="#{menuBean.limpiarSesion}"
action=""
rendered="#{menuBean.lMenuJSF[7].codPermiso ==
\"1\"}"id="nav_2_3"
value="#{menuBean.lMenuJSF[7].literal}"/> </t:commandNavigation2> <h:graphicImage
value="../../imagenes/guiones_separacion.gif" width="140"
height="1" rendered="#{menuBean.lMenuJSF[8].codPermiso ==
\"1\"}" /> ************************ SEARCH BUTTON ************************ <h:commandButton
value="#{msg.botonBuscar}"
action="" type="submit"
styleClass="stlBoton"
false;}"
RestaurarEstilo(this.name);"
ResaltarBoton(this.name);" tabindex="5"/> ************************ NEXT BUTTON ************************ <h:commandButton
id="botonSiguientePagina" type="submit"
value="#{msg.botonSiguiente}" action=""
styleClass="stlBoton"
RestaurarEstilo(this.name);"
ResaltarBoton(this.name);" /> |

