users@woodstock.java.net

webuijsf:listbox multiple option not working

From: gigi2 <ggtech888_at_gmail.com>
Date: Mon, 1 Jun 2009 12:28:06 -0700 (PDT)

Hello, JSF gurus,

I tried to use webuijsf:listbox for a multiple select dropdown list. Bu the
result list does NOT have a scroll bar even if I have more items than
specified in 'rows'. I've been searching on web for a while for this but it
seems everyone is using it with 'multiple='false''. It does not matter I
used 'selected' (with backing as an array of String or Object). The scroll
never shows up




JSP code
<webuijsf:listbox disabled="false" multiple="true" rows="1" id="test2"
items="#{queryBean.allPlatforms}" />

Java Bean code
public Option[] getAllPlatforms() {
List<Option> tmpPlatforms = new ArrayList<Option>();

tmpPlatforms.add( new Option("t1", "t1") );
tmpPlatforms.add( new Option("t2", "t2") );
tmpPlatforms.add( new Option("t3", "t3") );

allPlatforms = tmpPlatforms.toArray(new Option[1]);

return allPlatforms;
}

public void setAllPlatforms(Option[] allPlatforms) {
this.allPlatforms = allPlatforms;
}

if I remove 'multiple="true"', then the scroll bar shows up. And when I put
'multiple="true"' back in, the scroll bar is just gone. Seems to me no one
has tried this option with listbox before.

Please help. Feeling so desperate. What a headache! Thank you very much in
advance
-- 
View this message in context: http://www.nabble.com/webuijsf%3Alistbox-multiple-option-not-working-tp23820455p23820455.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.