tags:

views:

39

answers:

1

Hi, I have a managed bean that contains a collection of UISelectItem instances. How can i tell one instance to not render? Setting the selectitem.setRendered(false) still renderes that item... I'd like to manipulate the UiSelectItem instance.

So basicly i have a h:selectOneMenu that gets populated by this collection by f:selectItems. But some of these items i don't want to be displayed.

Thank you

UPDATE: Looks like the rendered field is inherited by the UIComponentBase, but has no functionality. Now I'm trying to make a custom MenuRenderer in combination with an extended UISelectitem that has a disabled field.

A: 

I know it's not a direct answer to your question, but maybe disabling the item would be enough for you? Looks like you could do (I haven't tried that):

<f:selectItem itemDisabled="true" ... />
Grzegorz Oledzki
Thanks, but i really don't want to disable it in the view. I'm now trying to extend UISelectItem and make a custom renderer, but it's not trivial.
Michael Bavin