Blackberry ListField Selection Help (not getSelectedIndex() Related)
I have a list field that I am using to display a list of categories, these categories have sub categories. I need to navigate the top level categories using the ListField. So when user selects Category 1 I can load a list of Sub Categories.
Pr开发者_JAVA技巧oblem is I know getSelectedIndex() will tell me the index of the current selected category, but that is of no help because I need to get the title or better the DB ID of the category, so I can have the webserver serve up the sub categories.
The closest I can figure is using rows.elementAt(Index).toString();
to tell give me the current row, but I have been unable to find examples on how to use it properly.
So if any one has a snip of code showing how to get the contents of a listField row, it would be appreciated.
screen shot of what I am talking about:
I usually create a vector that I use to build the ListField from. Then when a row is selected I simply access the vector at the same index as the selection.
精彩评论