title: RichFaces rich:panelMenu stops working when a4j:include'd
body: <p>From <a href="https://stackoverflow.com/questions/2335058/richfaces-richpanelmenu-from-rf-demo-causes-error">this previously asked question</a>, I have noticed that when I move a <code>rich:panelMenu</code> (which works fine when in an <code>index.jsp</code> page) into <code>another.jsp</code> and then include that in <code>index.jsp</code> using an <code>a4j:include</code> tag, the <code>rich:panelMenu</code> functionality stops working.</p>
  
  <p>Is this a bug?</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>In response to code and after some isolation testing, the problem appears to stem from a coexistence of a <code>rich:dataTable</code> in another tab of a <code>rich:tabPanel</code> from the panelMenu.</p>
  
  <p>If my <code>index.jsp</code> contains a default simple panelMenu using demo code (inc in the bean) it works as expected:</p>
  
  <pre><code>&lt;f:view&gt;
      &lt;rich:page pageTitle="title" markupType="xhtml"&gt;
          &lt;h:outputText id="setup" value="#{MyBacking.setup}" /&gt;
          &lt;rich:toolBar height="35" itemSeparator="line"&gt;
              &lt;rich:toolBarGroup location="left"&gt;
                  &lt;a4j:form&gt;
                      &lt;a4j:outputPanel id="panel"&gt;
                          &lt;h:outputText style="text-align: center" value="Node Select " /&gt;
                          &lt;h:selectOneMenu id="nodes" value="#{MyBacking.chosenNode}"&gt;
                              &lt;f:selectItems value="#{MyBacking.nodes}" /&gt;
                          &lt;/h:selectOneMenu&gt;
                          &lt;a4j:commandButton value="Retrieve"
                              reRender="panel,contentPanel"
                              onclick="this.disabled=true" oncomplete="this.disabled=false" /&gt;
                      &lt;/a4j:outputPanel&gt;
                  &lt;/a4j:form&gt;
              &lt;/rich:toolBarGroup&gt;
          &lt;/rich:toolBar&gt;
  &lt;!-- added start --&gt;
          &lt;h:form id="form"&gt;
              &lt;h:panelGrid columns="2" width="100%"&gt;
                  &lt;rich:panelMenu style="width:200px" mode="ajax"
                      iconExpandedGroup="disc" iconCollapsedGroup="disc"
                      iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
                      iconCollapsedTopGroup="chevronDown"&gt;
                      &lt;rich:panelMenuGroup label="Group 1"&gt;
                          &lt;rich:panelMenuItem label="Item 1.1"
                              action="#{PanelMenu.updateCurrent}"&gt;
                              &lt;f:param name="current" value="Item 1.1" /&gt;
                          &lt;/rich:panelMenuItem&gt;
                      &lt;/rich:panelMenuGroup&gt;
                  &lt;/rich:panelMenu&gt;
                  &lt;rich:panel bodyClass="rich-laguna-panel-no-header"&gt;
                      &lt;a4j:outputPanel ajaxRendered="true"&gt;
                          &lt;h:outputText value="||#{PanelMenu.current}|| selected"
                              id="current" /&gt;
                      &lt;/a4j:outputPanel&gt;
                  &lt;/rich:panel&gt;
              &lt;/h:panelGrid&gt;
          &lt;/h:form&gt;
  &lt;!-- added end --&gt;
          &lt;rich:panel&gt;
              &lt;h:panelGroup layout="block" id="contentPanel"&gt;
                  &lt;a4j:include viewId="#{MyBacking.viewId}"&gt;
                      &lt;f:param name="targetIdParam" value="content" /&gt;
                  &lt;/a4j:include&gt;
              &lt;/h:panelGroup&gt;
          &lt;/rich:panel&gt;
      &lt;/rich:page&gt;
  &lt;/f:view&gt;
  </code></pre>
  
  <p>But if I remove the added <code>panelMenu</code> from this file and paste it into a separate tab in a <code>tabPanel</code> in an external jsp page which is then <code>a4j:include</code>d in the above <code>index.jsp</code>, when it's loaded, the <code>panelMenu</code> refuses to work (outputting nothing to the log or console) while in the other tab in my tab set there is a <code>rich:dataTable</code>. With the exact same code, but with the <code>dataTable</code> removed from the second tab, it all starts working again.</p>
  
  <p>Here's the broken <code>a4j:include</code>d file with <code>panelMenu</code>:</p>
  
  <pre><code>&lt;h:panelGrid columns="1" border="0" style="width: 100%"&gt;
      &lt;rich:tabPanel switchType="client" rendered="true"&gt;
          &lt;rich:tab styleClass="tab" label="Node Logs"&gt;
              &lt;h:panelGrid columns="2" border="0"&gt;
                  &lt;h:graphicImage value="/btn50.png" width="30" height="30"
                      alt="Logs" /&gt;
                  &lt;h:outputText value="log: #{MyBacking.chosenNode}"
                      styleClass="pageTitle" /&gt;
              &lt;/h:panelGrid&gt;
  
              &lt;h:form id="form"&gt;
                  &lt;h:panelGrid columns="2" width="100%"&gt;
                      &lt;rich:panelMenu style="width:200px" mode="ajax"
                          iconExpandedGroup="disc" iconCollapsedGroup="disc"
                          iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
                          iconCollapsedTopGroup="chevronDown"&gt;
                          &lt;rich:panelMenuGroup label="Group 1"&gt;
                              &lt;rich:panelMenuItem label="Item 1.1"
                                  action="#{PanelMenu.updateCurrent}"&gt;
                                  &lt;f:param name="current" value="Item 1.1" /&gt;
                              &lt;/rich:panelMenuItem&gt;
                          &lt;/rich:panelMenuGroup&gt;
                      &lt;/rich:panelMenu&gt;
                      &lt;rich:panel bodyClass="rich-laguna-panel-no-header"&gt;
                          &lt;a4j:outputPanel ajaxRendered="true"&gt;
                              &lt;h:outputText value="||#{PanelMenu.current}|| selected"
                                  id="current" /&gt;
                          &lt;/a4j:outputPanel&gt;
                      &lt;/rich:panel&gt;
                  &lt;/h:panelGrid&gt;
              &lt;/h:form&gt;
  
          &lt;/rich:tab&gt;
  
          &lt;rich:tab styleClass="tab" label="Docs"&gt;
              &lt;rich:dataTable value="#{MyBacking.MyData}"&gt;
                  &lt;rich:column style="text-align:center" width="150px"&gt;
                  &lt;/rich:column&gt;
              &lt;/rich:dataTable&gt;
          &lt;/rich:tab&gt;
      &lt;/rich:tabPanel&gt;
  &lt;/h:panelGrid&gt;
  </code></pre>
  
  <p>Thanks</p>