-
1. Re: a4j:included rich:panelMenu doesn't work
nbelaevski Feb 25, 2010 3:46 PM (in response to bp2s)Hi Mark,
Can you please post the code for minified example, on which this behavior can be reproduced?
-
2. Re: a4j:included rich:panelMenu doesn't work
bp2s Mar 1, 2010 7:02 AM (in response to nbelaevski)Hi Nick
The problem appears to stem from a coexistence of a rich:dataTable in another tab of a tabPanel from the panelMenu.
If my index.jsp contains a default simple panelMenu using demo code (inc in the bean) it works as expected:
<f:view> <rich:page pageTitle="title" markupType="xhtml"> <h:outputText id="setup" value="#{MyBacking.setup}" /> <rich:toolBar height="35" itemSeparator="line"> <rich:toolBarGroup location="left"> <a4j:form> <a4j:outputPanel id="panel"> <h:outputText style="text-align: center" value="Node Select " /> <h:selectOneMenu id="nodes" value="#{MyBacking.chosenNode}"> <f:selectItems value="#{MyBacking.nodes}" /> </h:selectOneMenu> <a4j:commandButton value="Retrieve" reRender="panel,contentPanel" onclick="this.disabled=true" oncomplete="this.disabled=false" /> </a4j:outputPanel> </a4j:form> </rich:toolBarGroup> </rich:toolBar> <!-- added start --> <h:form id="form"> <h:panelGrid columns="2" width="100%"> <rich:panelMenu style="width:200px" mode="ajax" iconExpandedGroup="disc" iconCollapsedGroup="disc" iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right" iconCollapsedTopGroup="chevronDown"> <rich:panelMenuGroup label="Group 1"> <rich:panelMenuItem label="Item 1.1" action="#{PanelMenu.updateCurrent}"> <f:param name="current" value="Item 1.1" /> </rich:panelMenuItem> </rich:panelMenuGroup> </rich:panelMenu> <rich:panel bodyClass="rich-laguna-panel-no-header"> <a4j:outputPanel ajaxRendered="true"> <h:outputText value="||#{PanelMenu.current}|| selected" id="current" /> </a4j:outputPanel> </rich:panel> </h:panelGrid> </h:form> <!-- added end --> <rich:panel> <h:panelGroup layout="block" id="contentPanel"> <a4j:include viewId="#{MyBacking.viewId}"> <f:param name="targetIdParam" value="content" /> </a4j:include> </h:panelGroup> </rich:panel> </rich:page> </f:view>
But if I remove the added panelMenu from this file and paste it into a separate tab in a tabPanel in an external jsp page which is then a4j:included in the above index.jsp, when it's loaded, the panelMenu refuses to work (outputting nothing to the log or console) while in the other tab in my tab set there is a rich:dataTable. With the exact same code, but with the dataTable removed from the second tab, it all starts working again.
Here's the broken a4j:included file with panelMenu:
<h:panelGrid columns="1" border="0" style="width: 100%"> <rich:tabPanel switchType="client" rendered="true"> <rich:tab styleClass="tab" label="Node Logs"> <h:panelGrid columns="2" border="0"> <h:graphicImage value="/btn50.png" width="30" height="30" alt="Logs" /> <h:outputText value="log: #{MyBacking.chosenNode}" styleClass="pageTitle" /> </h:panelGrid> <h:form id="form"> <h:panelGrid columns="2" width="100%"> <rich:panelMenu style="width:200px" mode="ajax" iconExpandedGroup="disc" iconCollapsedGroup="disc" iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right" iconCollapsedTopGroup="chevronDown"> <rich:panelMenuGroup label="Group 1"> <rich:panelMenuItem label="Item 1.1" action="#{PanelMenu.updateCurrent}"> <f:param name="current" value="Item 1.1" /> </rich:panelMenuItem> </rich:panelMenuGroup> </rich:panelMenu> <rich:panel bodyClass="rich-laguna-panel-no-header"> <a4j:outputPanel ajaxRendered="true"> <h:outputText value="||#{PanelMenu.current}|| selected" id="current" /> </a4j:outputPanel> </rich:panel> </h:panelGrid> </h:form> </rich:tab> <rich:tab styleClass="tab" label="Docs"> <rich:dataTable value="#{MyBacking.MyData}"> <rich:column style="text-align:center" width="150px"> </rich:column> </rich:dataTable> </rich:tab> </rich:tabPanel> </h:panelGrid>
Thanks for any help.
-
3. Re: a4j:included rich:panelMenu doesn't work
bp2s Mar 2, 2010 9:08 AM (in response to bp2s)Hi Nick, the code is above as requested.
-
4. Re: a4j:included rich:panelMenu doesn't work
bp2s Mar 2, 2010 9:09 AM (in response to bp2s)I have a suspicion, the problem is with dataTable. Looking through a post on stackoverflow.com http://stackoverflow.com/questions/2237863/a4jincluded-richdatatable-negatively-affects-a4jcommandbutton
which is unrelated to rich:panelMenu but is related to rich:dataTable I think this problem stems from the latter.
-
5. Re: a4j:included rich:panelMenu doesn't work
bp2s Mar 7, 2010 6:46 AM (in response to bp2s)I had a jar conflict, involving facelets.