views:

68

answers:

1

Hi,

I am retrieving a string of values from json url. I have done it like...

for(int i=0;i<totalList;i++){
  String strAlert=jsArrShpList.get(i).toString();
  JSONObject joAlert=new JSONObject(strAlert);
  String shoppingList = joAlert.get("CategoryName").toString();

}

Now i want to add the strings to a list field and i want to get selected index. So plz help me out on how to do it and some sample code will be really helpful...

A: 

To get selected index you can use the method getSelectedIndex() from the ListField. See here for an example on how to add new items on the ListField.

See an introductory tutorial about list fields here.

Tarantula