5 Replies Latest reply on Aug 25, 2007 1:42 PM by haoues klklk

    Problem with menuItem and tabPanel in the same page

    haoues klklk Newbie

      Hi,

      I have a page (page A ) that include a simple tabPanel. Like all other pages it includes a rich:dropDownMenu. I cannot switch to another page when I am in A. I get a javascript error on IE6 .... and it seems to be related to "Richefaces.jsFormSubmit(...)" wich doesn't exist (the function)! Below my code :
      Page A
      ----------
      ... some HTML ....

      <%@ include file="/WEB-INF/templates/taglibs.jsp" %>
      <f:view>
      <c:if test="${requestScope['javax.servlet.forward.servlet_path'] eq null}">
      <%@ include file="/index.jsp" %>
      </c:if>
      <c:if test="${}" >
      <%@ include file="/index.jsp" %>
      </c:if>
      ... some HTML ....

      <f:subview id="navbar_sv">
      <h:form id="navbar_fo" >
      <rich:toolBar itemSeparator="none" id="nav_bar" >
      <rich:toolBarGroup itemSeparator="none" location="left">
      <rich:dropDownMenu value="Administration" >
      <rich:menuItem value="Add-Edit Season" action="admin_season-edit" actionListener="#{seasonEdit.load}" >
      <a4j:actionparam name="season_id" value="0" />
      </rich:menuItem>
      <rich:menuItem value="test2" action="test2" />
      </rich:dropDownMenu>
      </rich:toolBarGroup>
      </rich:toolBar>
      </h:form>

      </f:subview>

      ... some HTML ....

      <f:subview id="main_sv">
      <h:form id="main_fo" >
      <rich:tabPanel switchType="client">
      <rich:tab label="First">
      Here is tab #1
      </rich:tab>
      <rich:tab label="Second">
      Here is tab #2
      </rich:tab>
      <rich:tab label="Third">
      Here is tab #3
      </rich:tab>
      </rich:tabPanel>
      </h:form>
      </f:subview>

      ... some HTML ....

      </f:view>

      Thanks in advance.

        • 2. Re: Problem with menuItem and tabPanel in the same page
          haoues klklk Newbie

          Hi,

          I've seen in JIRA that the bug is resolved (RF-636), I re-built Richfaces (3.1.0 snapshot) but the problem remains.

          It seems to be the same with panelBar and SimpleTogglePanel (javascript error with menuItem).

          Thanks for your help.

          • 3. Re: Problem with menuItem and tabPanel in the same page
            haoues klklk Newbie


            First I want to thank you for your reactivity, the menuItem works now with tabPanel (I've just installed the richfaces-3.1.0-rc3)!

            Sorry for the precedent post.

            Unfortunately the bug remains for panelBar and SimpleTogglePanel (consequently modalPanel is not shown when in the same page ).

            Thanks for your attention.

            • 4. Re: Problem with menuItem and tabPanel in the same page
              Ilya Shaikovsky Master

              could you please the page with the latest problem.

              • 5. Re: Problem with menuItem and tabPanel in the same page
                haoues klklk Newbie

                HI,

                Below the src code. I've done many simple case by changing simpleToogle panel by panelBar etc... :

                <%@ include file="/WEB-INF/templates/taglibs.jsp" %>
                <f:view>
                <%@ include file="/WEB-INF/templates/admin_tmpl_header.jsp" %>

                <h:form id="me_fo">

                <a4j:keepAlive beanName="cppEdit"/>
                <a4j:keepAlive beanName="seasonSelect"/>
                <a4j:keepAlive beanName="orgSelect"/>

                <rich:panelBar id="me_pb" selectedPanel="tab1" height="100%" width="100%" >
                <rich:panelBarItem id="tab0" label="panelBar0">

                <a4j:region id="cal0_re" >
                <a4j:outputPanel id="cal0_op" >
                <rich:datascroller for="cpl0_dt" maxPages="100" renderIfSinglePage="false"
                rendered="#{cppEdit.cppList != null}"/>
                <rich:dataTable id="cpl0_dt" value="#{cppEdit.cppList}" var="cppWpr" width="100%"
                onRowMouseOver="this.style.backgroundColor='#F1E7C3'"
                onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
                rendered="#{cppEdit.cppList != null}" rows="6" >
                <f:facet name="header">
                <rich:columnGroup>
                <rich:column>
                <h:outputText value="Edit" />
                </rich:column>
                <rich:column >
                <h:outputText value="Name" />
                </rich:column>
                <rich:column >
                <h:outputText value="Umpires" />
                </rich:column>
                <rich:column >
                <h:outputText value="Season" />
                </rich:column>
                <rich:column >
                <h:outputText value="ClubChampionShip" />
                </rich:column>
                </rich:columnGroup>
                </f:facet>
                <rich:column>
                <a4j:region id="bt0_re">
                <a4j:commandButton image="images/edit.gif" rendered="#{cppWpr.btEdit}"
                action="#{cppEdit.editCompParent}" actionListener="#{cppEdit.load}"
                reRender="case_op" >
                <a4j:actionparam name="comp_parent_id" value="#{cppWpr.val.competitionParent.id}" />
                <a4j:actionparam name="comp_parent_param_id" value="#{cppWpr.val.id}" />
                </a4j:commandButton>
                </a4j:region>
                </rich:column>
                <rich:column>
                <h:outputText value="#{cppWpr.val.name}" />
                </rich:column>
                <rich:column>
                <h:outputText value="#{cppWpr.val.umpires.name}" />
                </rich:column>
                <rich:column>
                <h:outputText value="#{cppWpr.val.season.name}" />
                </rich:column>
                <rich:column>
                <h:selectBooleanCheckbox value="#{cppWpr.val.clubChampionship}" disabled="true" />
                </rich:column>
                </rich:dataTable>
                </a4j:outputPanel>
                </a4j:region>
                <!-- END RESULTS ZONE -->

                </rich:panelBarItem>
                </rich:panelBar>


                <a4j:status for="cal0_re"
                onstart="javascript:Richfaces.showModalPanel('mp');"
                onstop="javascript:Richfaces.hideModalPanel('mp')" />

                <rich:modalPanel id="mp" width="200" height="150" moveable="true" resizeable="true" >
                <f:facet name="header">
                <h:outputText style="text-align:center;" value="Please Wait ..." />
                </f:facet>
                <h:graphicImage height="100%" width="100%" value="images/wait_animation.gif" />
                </rich:modalPanel>

                </h:form>


                <%@ include file="/WEB-INF/templates/admin_tmpl_footer.jsp" %>
                </f:view>


                Thanks.