开发者

JSF2 set a UISelectItem to not render. With a custom MenuRenderer

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.


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" ... />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜