开发者

how to enable selectManyListBox scrollerbar when readonly attribute is true in JSF?

I am using <h:selectManyListBox> in my project. In view mode my component was

disabled including the scrollbar of that component.But i want to enable the scrollbar

of that component in view mode and v开发者_开发问答alues should be in non-editable mode

I have used readOnly attribute in <h:selectManyListBox>,

Please Help me....


As specified in its TLDDOC, just set the size attribute accordingly. It denotes the number of options shown at once. If not specified, then all options will be shown at once.

If you want to show 1 option while the fictive boolean expression #{bean.readonly} returns true, then you can make use of the ternary operator expr ? doThisIfTrue : orDoThisIfFalse in EL:

<h:selectManyListbox size="#{bean.readonly ? '1' : ''}">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜