problem in SelectItem[ ]
I have used the following code to dinamically display the state in a combo box according to the country selected in another combobox
public SelectItem[] getStateItems[]{
if(!country.equals("")){
String[] listState={};
listState=showState(selectCountry(country));
SelectItem[] stateItems=new SelectItem[listState.length];
for(int i=0;i<stateItems.length;i++)
{
System.out.println(listState[i]);
stateItems[i-1]=new SelectItem(listState[i]);
}
}
return stateItems;
}
public selectItem[] stateItems ={
new SelectItem("","--First Select Country--")
};
In the above code i am able to get all the states and it is successfully displaying in console. But it is not displaying the states in the state combobox.>

