-
1. Re: Expanded attribute of rich:collapsiblePanel
dreske01 May 18, 2011 4:44 AM (in response to elisei)Hello,
the same here with panelMenuGroup (RichFaces 4)
Tried all suggestions from the internet.
The groupMode on panelMenu (or mode on panelMenuGroup) is set to server or ajax (tried all).
Neither the action, the changeExpandListener is fired nor the expanded value is written back to the bean.
<h:form> <rich:panelMenu itemMode="ajax" groupMode="ajax" activeItem="#{navigation.model.selectedChild}"> <rich:panelMenuGroup label="#{label.navAccessRight}" expanded="#{navigation.model.menuState['accessright']}" changeExpandListener="#{navigation.groupSelected('accessright')}">
Hope, somebody can help!
-
2. Re: Expanded attribute of rich:collapsiblePanel
elisei May 18, 2011 4:55 AM (in response to dreske01)Have you tried bindind the component to an object in the bean and then try to read the expanded property there?
-
3. Re: Expanded attribute of rich:collapsiblePanel
elisei May 19, 2011 5:01 AM (in response to elisei)Is there any possibillity to trigger an ajax event when the panel is expanded or the header clicked?
-
4. Re: Expanded attribute of rich:collapsiblePanel
bcn Oct 12, 2011 4:44 PM (in response to elisei)If it still helps you, I did it like this:
point the toggleListener attribute to a bean method with parameter PanelToggleEvent. In the method, use event.getExpanded() to set the value to a boolean bean field. Bind the field to the expanded attribute.
That works fine if the page is reloaded.
However, if the panel is ajax-updated by another action, the expanded attribute is not re-evaluated (although I changed it on the server-side) and the panel does not change state.
My switch type is ajax.
Regards
-
5. Re: Expanded attribute of rich:collapsiblePanel
bcn Oct 13, 2011 12:13 PM (in response to bcn)I made a write-up of the problem:
If a rich:collapsiblePanel is rerendered via ajax, the expanded attribute is not re-evaluated.
<rich:collapsiblePanel toggleListener="#{bean.toggle}"
expanded="#{bean.open}" switchType="ajax"
onswitch="#{bean.render ? 'load();' : ''} >
The bean.render method is called, the open method is not (verified with the debugger).
So e.g. the panel is opened by click, some other action changes the (session) bean property open to false and then an action ajax-rerenders the panel, the panel is still open instead of closed.
Only on a page GET reload is the panel closed.
RichFaces 4.0.0.final
Should I file a bug?
-