>  
> Hello all, 
>   
> I'm new to myfaces and a greenhorn with jsf.  I'm wondering if the
> panelNavigation and JSCookMenu components support dynamic population.  For
> example, I have leaned to dynamically populate a selectOneListbox by binding
> it to a SelectItem[] array.  Has anyone done this? 
>   
James,

Not quite dynamic population but I have acheived this by using the
rendered attribute on the commandNavigation tags.

The downside is you have to have a tag for every possible option and
just render the ones you want.  In my case it is for a nav menu with a
finite list of items so it works well for me and also means the logic
on what to display is in the backing bean but if you were using this
to simulate a tree it could get out of hand - enter tree2.

I have only tried this with panelNavigation and not the the JSCookMenu.

The menu has sections so I make sure the bean returns the rendered
flag for all the child commandNavigation tags as false if the parent
item is false.  Again, this is fine for a small list but doesn't
strike me as ideal for a lot of items.  I have it in an include which
means all the rendered calls have to be made for every page.

I'm very interested if Henri or anyone else has alternate solutions.

HTH

Adrian
Auckland, NZ

Reply via email to