代码之家  ›  专栏  ›  技术社区  ›  Rahul Kalidindi

Using listField to display Json string

  •  1
  • Rahul Kalidindi  · 技术社区  · 14 年前

    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...

    1 回复  |  直到 14 年前
        1
  •  1
  •   Community Egal    7 年前

    若要获取所选索引,可以使用该方法 getSelectedIndex() ListField here for an example on how to add new items on the ListField.

    here .