« Return to Thread: How to fill a DropDownList with custom options?

Re: How to fill a DropDownList with custom options?

by HandyGeek :: Rate this Message:

Reply to Author | View in Thread

Rick,
I am using NB6.0.1, and the "Configure Default Options..." displays for
the Radio Button Group as you state below; but does not exist for the
Drop Down box.  Were you aware of this behavior, or is my NB
installation messed up?
/David

Rick Fincher wrote:

> You don't use the add menu for that.  Right-click on the dropdown list
> in the visual editor and select: "Configure Default Options..."
>
> A dialog box will pop up that lets you enter both the display (what
> you see on the screen) and value (what gets returned by the getValue()
> method) items for each menu entry.  You can also select items to be
> selected by default and enable multiple selections in this dialog.
>
> You can also add options like this:
> dropDownPriceDefaultOptions.setOptions(new
> com.sun.rave.web.ui.model.Option[]{new
> com.sun.rave.web.ui.model.Option("1000", "$1,000"), new
> com.sun.rave.web.ui.model.Option("2000", "$2,000"));
>
> Be aware that the value comes first, then the label in the new Option
> constructor, the opposite of the dialog box in the visual editor.
>
> You can set the selected option via:
>
> dropDownPriceDefaultOptions.setSelectedValue("1000");
>
> That can be an array for multiple selections if multiple is enabled.
>
> Rick
>      
> Roy Abu Bakar wrote:
>> I dunno, but you can try Configure Default Options in the
>> context-menu to add
>> item.
>>
>>
>> q5616417 wrote:
>>  
>>> Thank you a lot. Of course this works. Do you have any idea why the
>>> "add"-item in the context-menu of the beans is not activated?
>>>
>>>    
>>
>>  
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: How to fill a DropDownList with custom options?

LightInTheBox - Buy quality products at wholesale price