2 Replies Latest reply on Jul 29, 2008 9:49 AM by wang yufeng

    simpleTogglePanel 's opened doesn't work with backbean

    wang yufeng Newbie

      simpleTogglePanel 's opened is backed with an EL,which I hope to control the togglepanel's opening and closing. But it fails. The code is as follows:

      <a4j:outputPanel id="sidebar">
       <rich:simpleTogglePanel label="InfoA" id="panelA" opened="#{queryHome.isPanelOpened(queryHome.index)}" actionListener="#{queryHome.actionListener}" rendered = "true" reRender = "sidebar"switchType="ajax">
       <h:form id="infoAForm"> ... </h:form >
      
       </rich:simpleTogglePanel >
       <rich:simpleTogglePanel label="InfoB" id="panelB" opened="#{queryHome.isPanelOpened(queryHome.index)}" actionListener="#{queryHome.actionListener}" rendered = "true" reRender = "sidebar"switchType="ajax">
       <h:form id="infoBForm"> ... </h:form >
       </rich:simpleTogglePanel >
      
       </rich:simpleTogglePanel >
       <rich:simpleTogglePanel label="InfoC" id="panelC" opened="#{queryHome.isPanelOpened(queryHome.index)}" actionListener="#{queryHome.actionListener}" rendered = "true" reRender = "sidebar"switchType="ajax">
       <h:form id="infoCForm"> ... </h:form >
       </rich:simpleTogglePanel >
      </a4j:outputPanel >


      I find queryHome.actionListener method can be called each time and the a4j:outputPanel can be properly rerendered. But the queryHome.isPanelOpened(queryHome.index) method is not correctly called: with all togglepanels initailly closed, after panelA is opened, when to open panelB, panelB's isPanelOpened is called while panelA's isPanelOpened is never called and evaluted so that panelA is opened state cannot be marnipulated by server-side.