6 Replies Latest reply on Jun 8, 2009 8:05 AM by cremersstijn

    problem with simpletogglepanel and opened

    cremersstijn

      I have a weird situation with the simpleTogglePanel.

      I have a form with a tabpanel with the tabs.
      on the last tab i have multiple simpleTogglePanel.
      When i go the first time to the last tab with the simpleTogglePanels, the toggles are opened as i defined in the opened variable:

      <rich:simpleTogglePanel
       label="#{msg.packlistInformation_generalInformation}"
       switchType="ajax"
       opened="#{deliveryTrackingDetailBean.generalPacklistInformationOpen}"
       action="#{deliveryTrackingDetailBean.openOrCloseGeneralPacklistInformation}">
      
       ...
       </rich:simpleTogglePanel>
      


      But when i then go to anohter tab and then back to the tab with the simpleTogglePanels, the opened variables aren't read anymore....

        • 1. Re: problem with simpletogglepanel and opened
          nbelaevski

          Hi,

          Please post tab panel/tabs code.

          • 2. Re: problem with simpletogglepanel and opened
            cremersstijn

            Xhtml with the tabs:

            <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:rich="http://richfaces.org/rich"
             xmlns:a4j="http://richfaces.org/a4j"
             template="/layout/template.xhtml">
            
            <ui:define name="body">
             <h:form>
             <a4j:queue />
            
             <rich:panel>
             <f:facet name="header">
             <h:panelGroup>
             #{msg.deliveryTrackingDetail_deliveryDetailsForPacklist} #{deliveryTrackingDetailBean.webDeliveryView.packlist}
             </h:panelGroup>
             </f:facet>
            
             <rich:tabPanel selectedTab="#{deliveryTrackingDetailBean.selectedDetailTab}">
             <rich:tab
             label="#{msg.deliveryTrackingDetail_salesOrderInformation}"
             action="#{deliveryTrackingDetailBean.loadSalesOrderInformation}"
             name="salesOrderInformation">
             <a4j:include viewId="salesOrderInformation.xhtml" ajaxRendered="false"/>
             </rich:tab>
             <rich:tab
             label="#{msg.deliveryTrackingDetail_customerInformation}"
             action="#{deliveryTrackingDetailBean.loadCustomerInformation}"
             name="customerInformation">
             <a4j:include viewId="customerInformation.xhtml" ajaxRendered="false"/>
             </rich:tab>
             <rich:tab
             label="#{msg.deliveryTrackingDetail_packlistInformation}"
             action="#{deliveryTrackingDetailBean.loadPacklistInformation}"
             name="packlistInformation">
             <a4j:include viewId="packlistInformation.xhtml" ajaxRendered="false"/>
             </rich:tab>
             </rich:tabPanel>
            
             <br style="clear:both;"/>
            
             <div class="actionButtons" style="width:800px;">
             <h:commandButton value="#{msg.cancel}" action="#{deliveryTrackingSearchBean.reloadDeliveryTrackingSearch}"/>
             </div>
            
             <br/><br/>
            
             </rich:panel>
            
             </h:form>
            
             <a4j:include viewId="itemListPopup.xhtml" ajaxRendered="false"/>
             <a4j:include viewId="cartonForSizePopup.xhtml" ajaxRendered="false"/>
             <a4j:include viewId="ediCartonPopup.xhtml" ajaxRendered="false"/>
            
            </ui:define>
            
            </ui:composition>
            


            packlistinformation.xhtml with simpletogglepanel:
            <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:rich="http://richfaces.org/rich"
             xmlns:a4j="http://richfaces.org/a4j">
            
             <rich:simpleTogglePanel
             label="#{msg.packlistInformation_generalInformation}"
             switchType="ajax"
             opened="#{deliveryTrackingDetailBean.generalPacklistInformationOpen}"
             height="275px"
             action="#{deliveryTrackingDetailBean.openOrCloseGeneralPacklistInformationAction}">
            
             <h:panelGrid columns="2" width="100%" columnClasses="alignTop,alignTop">
            
             <a4j:include viewId="generalPacklistInformation.xhtml" ajaxRendered="false"/>
            
             <a4j:include viewId="milestoneInformation.xhtml" ajaxRendered="false"/>
            
             </h:panelGrid>
             </rich:simpleTogglePanel>
            
             <rich:simpleTogglePanel
             label="#{msg.packlistInformation_cartonInformation}"
             action="#{deliveryTrackingDetailBean.openOrCloseCartonInformation}"
             opened="#{deliveryTrackingDetailBean.cartonInformationOpen}"
             switchType="ajax"
             height="275px">
             <a4j:include viewId="cartonInformation.xhtml" ajaxRendered="false"/>
             </rich:simpleTogglePanel>
            
             <rich:simpleTogglePanel
             label="#{msg.packlistInformation_materialInformation}"
             opened="#{deliveryTrackingDetailBean.materialInformationOpen}"
             action="#{deliveryTrackingDetailBean.openOrCloseMaterialInformation}"
             switchType="ajax"
             height="275px">
             <a4j:include viewId="materialInformation.xhtml" ajaxRendered="false"/>
             </rich:simpleTogglePanel>
            
             <rich:simpleTogglePanel
             label="#{msg.packlistInformation_ediInformation}"
             action="#{deliveryTrackingDetailBean.openOrCloseEdiInformation}"
             opened="#{deliveryTrackingDetailBean.ediInformationOpen}"
             switchType="ajax"
             height="150px">
             <a4j:include viewId="ediInformation.xhtml" ajaxRendered="false"/>
             </rich:simpleTogglePanel>
            </ui:composition>
            


            The deliveryTrackingDetailBean is a session scoped backing bean,
            the getters for the opened are booleans.



            • 3. Re: problem with simpletogglepanel and opened
              ilya_shaikovsky

              which RF version used?

              • 4. Re: problem with simpletogglepanel and opened
                cremersstijn

                the environment:

                richfaces-api-3.3.0.GA
                richfaces-impl-3.3.0.GA
                richfaces-ui-3.3.0.GA
                darkX-3.2.2.SR1 (i need to updated this one)
                jsf-api-1.2_08
                jsf-impl-1.2._08
                jsf-facelets-1.1.14

                the application runs on websphere application server 6.1 with ejb3 feature pack.


                • 5. Re: problem with simpletogglepanel and opened
                  ilya_shaikovsky

                  could you please at list just check with 3.3.1 GA?

                  • 6. Re: problem with simpletogglepanel and opened
                    cremersstijn

                    wooohooo!! it works!!