i have an app that uses multi-select dropdown lists in a VWP page, and for all of these dropdown lists scroll bars DO appear when the list size is > the number of display rows specified. These dropdown lists are populated by data read from database tables.
Here is the jsp for one example: <webuijsf:listbox id="listBusinessUnit" items="#{ReportPage.lbBusinessUnitList}" multiple="true" rows="8" selected="# {ReportPage.businessUnitSelected}" style="left: 24px; top: 48px; position: absolute" width="250px"/> The actual construction of the list bBusinessUnitList is done by this routine, where optArray is an array derived from the database table: private List<Option> convertForListbox(Option[] optArray) { List<Option> theList; int n = optArray.length; theList = (List<Option>) Arrays.asList(optArray); return (theList.subList(1, n)); } Maybe the issue you are experiencing may be due to either (1) showing only 1 row at a time; or (2) using an array instead of a list to back the dropdown list Bill On Jun 1, 2009, at 3:43 PM, Ginger Cheng wrote: > > Hello, Everyone, > > Please allow me to ask this webuijsf:listbox question here. I can't > find > helps in days. > 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 > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---