tags:

views:

528

answers:

1

I'm attempting to use a RichFaces panelMenu as a navigation menu but have yet to figure out a way for it to maintain state between requests. Is there anyway to tell the panelMenu to render itself with certain groups expanded without using ajax?

I've attempted setting the value on the panelMenu and using selectedChild, all to no avail.

+1  A: 

The state of the expanded sections is controlled by the rich:panelMenuGroup children, in particular their expanded attributes; these can be bound to server-side objects. You need to ensure their server-side state is updated somehow, though, either through setting the rich:panelMenu with the attribute expandMode="server" (which will cause a server-side submit) or by making it a child of whatever form is being submitted.

McDowell
expandMode="ajax" will be better for this case
cetnar
Thank you! That worked perfectly. I feel kind of silly not having seen that expanded attribute before.
Brian Feaver
@cetnar - I agree (I probably read too much into the _without using ajax_).
McDowell