Drop Down List
Hi,
I want to use Drop Down List.In Drop Down list i want to retrieve the value of Drop Down List.
For example i create Drop Down List as follow:
Iterator<Category> it=allCategory.iterator();
int i=0;
while(it.hasNext())
{
Category cat1= it.next();
listoption=new Option(cat1,cat1.getName());
i++;
}
And in want to retrieve the cat1 for selected option.
I used following code:
Category c= (Category) dropDown1.getValue();
But it gives me CastException.
I also use:
//dropDown1.getItems();
// dropDown1.getSubmittedValue();
// dropDown1.getSelected();
//dropDown1.getValue()
but none of them work.In some of them gave me the error CastException and in one of them gave me null(I think in getSubmittedValue();)
What must i do?

