-
1. Re: rich:panelBar rendering problem
ilya_shaikovsky May 21, 2009 10:45 AM (in response to jgbaldasano)show the code. And quick question.. are you using ajax navigation? It processes fine only redirect navigation. This described many times there and in the dev guide.
-
2. Re: rich:panelBar rendering problem
jgbaldasano May 22, 2009 4:18 AM (in response to jgbaldasano)Thank you for your fast reply.
Here is the code:
menu.xhtml<ui:composition> <f:view> <h:form method="post" id="ourForm"> <h:panelGrid class="floatLeft"> <rich:panelBar id="pBM" selectedPanel="#{ourBean.panel}" height="200" width="220"> <rich:panelBarItem label="#{geremuaMain.UserOptions}" headerClass="titulo_menu" headerClassActive="titulo_menu_activo"> <h:panelGrid columns="1" > <h:outputLabel value="Enter" styleClass="menuStyle"> <a4j:support action="doEnter" event="onclick"/> </h:outputLabel> <h:outputLabel value="#{messages.MenuOption1}" styleClass="menuStyle_menu"> <a4j:support action="menuOptions1" event="onclick"/> </h:outputLabel> <!-- (...More options...) --> </h:panelGrid> </rich:panelBarItem> </rich:panelBar> </h:panelGrid> </h:form> </f:view> </ui:composition>
faces-config.xml<navigation-rule> <description>MenuNavigationRules</description> <navigation-case> <from-outcome>doEnter</from-outcome> <to-view-id>/enter.xhtml</to-view-id> </navigation-case> <navigation-case> <from-outcome>menuOptions1</from-outcome> <to-view-id>/shoppingCart.xhtml</to-view-id> <!-- This is the way we have tried to avoid the problem but using it we lose the locale <redirect/> --> </navigation-case> (...) </navigation-rule>
The point is that, if we use h:outputLinks directly or if we use redirect in the navigation rules called from a4j:support action="..." we solve panelBar problem but we realized that user selected Locale was lost. This is how we set the locale:FacesContext context = FacesContext.getCurrentInstance(); context.getViewRoot().setLocale(new Locale("en"));
Hope this helps you.
Thanks again. -
3. Re: rich:panelBar rendering problem
ilya_shaikovsky May 22, 2009 5:34 AM (in response to jgbaldasano)if you want perform submits from the child Item components you should define submitMode=none for menu or concrete children.
-
4. Re: rich:panelBar rendering problem
sod2009 May 22, 2009 7:28 AM (in response to jgbaldasano)Hello ilya_shaikovsky, the problem is that we are not using menu, we are using a panelBar, and on each one of the panelBarItems we have an outputLabel with a4j:support calling a method on the onClick event, wich returns the string for using it with the navigation rules.
Is when using this kind of navigation, when the new page is being rendered, after the navigation is done, is when the panelBar gets middle-white coloured like if it wasn't completely rendered.
Thank you! -
5. Re: rich:panelBar rendering problem
ilya_shaikovsky May 22, 2009 7:40 AM (in response to jgbaldasano)sorry :( It was fool mistake :)
so.. you wants to navigate using support. Sure you will lost the locale with redirect. But we not supports navigation without it. The only way except redirect is to have all the content wrapped within included content(using a4j:include)... a4j:include allows to use standard navigation via ajax and without redirects inside. -
6. Re: rich:panelBar rendering problem
sod2009 May 22, 2009 8:12 AM (in response to jgbaldasano)As we said we are using Facelets and the menu and the body we load on each page are independent xhtml files. If i've correctly understand we can't do the navigation without redirect? Is it the only way to have everything well rendered when working with richfaces? Is there something wrong with the code we've pasted above?
Thanks for your help!