SIMPLE TOGGLE PANEL inside modal panel not toggling when expected
jayanthp Jan 27, 2011 10:19 PMHi,
Again I am posting this after running out of ideas to see where the problem is.
i am using
RichFaces 3.3.1
Tomahawk 1.1.5
Here is the description:
I have a modal panel as follows: <rich:modalPanel id="orderPanel" width="785" minHeight="490" autosized="true" >
within it i have this hiarchy :
<h:form>
<div style="width:100%;height:480px;overflow:auto;">
<h:panelGrid id="gridorderviewpanel" columns="1" width="100%">
<a4j:outputPanel id="orderviewPanel">
<rich:panel id="buttonpanel">
........
</rich:panel>
....
... // 8 simple toggle panels come here
...
</a4j:outputPanel>
</h:panelGrid>
</div>
</h:form>
within the a4j:outputPanel i have 8 simple toggle panels each of them having the following:
1) a unique id
2) immeditae="true"
3) opened = "{modalpanelbean.booleanvalueassociatedwiththesimpletogglepanel}"
4) an action listener which toggles the particular booleanvalue
5) reRender =" the id of the simpel toggle panel mentioned in 1) above "
afetr deployment i see simple toggling wrorks as expected for all the toggle panels - OK
Now i add two a4j:commandButtons in the rich:panel id="buttonpanel" .
one button is for expandAll simple toggle panels the other is for collapseAll simple toggle panels. They are mutually exclusive ( both are not displayed at a same time )
<a4j:commandButton value="ExpandAll" rendered="#{modalpanelbean.expandAll}" actionListener="#{modalpanelbean.toggleAllPanelListener}" reRender="gridorderviewpanel" />
<a4j:commandButton value="CollapseAll" rendered="#{!modalpanelbean.expandAll}" actionListener="#{modalpanelbean.toggleAllPanelListener}" reRender="gridorderviewpanel" />
So when expandall is pressed the action listener sets all 8 simple toggle boolean values = true hence they are opened. similarly when closeAll is pressed they are all set false and they are closed. Note both the buttons rerender the entire modal panel grid gridorderviewpanel.
Now both these buttons are working fine and all the 8 simpel toggle panels expand and close accordingly - OK
However Problem occurs when i toggle any one of the panels separately, and then i click on the the expandAll and closeAll buttons. After indivudually clicking on any of the simple toggle panels, then the expandAll and closeAll buttons do not have any effect on that particular simple toggle panel.
For ex if the view comes uo and all panels are closed. I toggle the 1st one and open/expand it. Now when i click on expand all, all the remaining 7 toggles are also opened. But now if i clock on close all, only the last 7 close and the 1st one remains open as it is. susbesquent expandall and closeAll button action has no effect on this simple toggle panel. It only closes when i individually click on it.
I tried reRendering each of the 8 ids instead of the entire panel id, i tried making keepVisualState="false" for modal panel but stil li am stuck with this problem.
Can anyone please help me and see what may be worng or if you had the same problem
Thanks
Jayanth