tags:

views:

192

answers:

2

Hi,

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 values should be in non-editable mode

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

Please Help me....

+2  A: 

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' : ''}">
BalusC
Hi BalusC,Sorry for tat...i have deleted tat answerCan u explain in detail?Suppose i have 100 entries in my h:SelectManyListBox , i'm selecting 10 values from theList and i want to view Selected values from the 100 entries in view Page(ReadOnlyMode).So my requirement is to enable the scrollbar of h:SelectManyListBox in view Page.Thanks, Ramesh
Ramesh
Then just set the `size` attribute accordingly? If you want to display only 10 items at once, set it to 10.
BalusC
A: 

Hi BaluC, in my case , i am having h:selectManyListbox which i disabled (setting disabled=true). As the component is disabled , the scrollbar is also disabled. But i want to enable vertical scrollbar , to facilitate user to see the options selected.At the same time i want to restrict user to deselect the selected options(want to restrict user to edit selected values). Please suggest me to find soultion for this.?

Chandra