dropdown default list

Can someone tell me how i can add a default dropdown set of items to my dropdown object? I see from other postings that this happens when the component getsbound to something. But I do not see an easy mechanism to restore it.
[246 byte] By [asnotrocket] at [2007-11-26 11:10:10]
# 1
Try this thread.. http://swforum.sun.com/jive/thread.jspa?threadID=63252
Slava17 at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...
# 2
I have tried Jetsons ( http://swforum.sun.com/jive/thread.jspa?threadID=63252) step by step instruction few times, but haven't got it working. If somebody succeeded, could you tell if you did something different.
enska at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...
# 3

Did you bind the OptionsList property to the Dropdown list component?

In other words, if on the design canvas you click the Dropdown list component, what value do you in the items field of the Properties window?

I did not do anything different from Chris's (Jetsons) instructions and the code worked fine.

Thanks

Slava

Slava17 at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...
# 4

I did that binding and I added the property to the sessionbean, because I didn't find the way to add it to the page.

IDE shows:

Cannot find symbol variable nameOptionsList..

Cannot find symbol constructor Option...

Cannot find symbol variable nameOptionsList...

It seems that the property (variable) is in wrong place. How it should be added?

enska at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...
# 5

You can access properties in the Session bean by prepending your call with getSessionbean1(), that is getting a property say named optionList would read as: getSessionbean1().getOptionList().

Onthe other hand, you can always add property to your page bean. As with the Session bean you need to find your bean in the Project window. You'll find it in this window under Source packages, or under src if you open Files layout of the Project window.

Slava

Slava17 at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...
# 6
Hi,enska try thisright clike in java editor->Fix ImportsThanksSmile
nsqsmile at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...
# 7
thanks Slava,I added property in files->projectname->src->projectname->page1.java, now I have error:class Option not found , from the linethis.nameOptionsList = new Option[listSize];Tomppa
enska at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...
# 8
Now you need to fix imports by adding com.sun.rave.web.ui.model.Option. Smile explained how to do it in one of the previous replies.Slava
Slava17 at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...
# 9

For some reason fix imports show me first only swing-Option (or maybe I was too hasty).

I did it manually like here;

http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/lis tbox_components.html

This was missing in Chris's text, but anyway I got it working now.

Grateful for your help :-)

Tomppa

enska at 2007-7-7 3:24:41 > top of Java-index,Development Tools,Java Tools...