02-21-2010 11:22 PM
I am trying to implement lists. I have used listfield to show the contents on another screen in a list.. Now i want to select one of them and on clicking them i want the details of that item.. what should i use ?? Please help..
Solved! Go to Solution.
02-22-2010 12:24 AM - edited 02-22-2010 04:55 AM
You will have to :
1) Override navigationClick() for the list.
2) You can find the index of the list item by getSelectedIndex().
3) With the help of this index you can display the rest details of the list on other screen.
Hope it gives u a direction. All the best.
02-22-2010 04:45 AM
Two other options:
Assume you are using MainScreen, then the click will create a menu by going through makeMenu. So you can:
a) Have code in makeMenu to check the Field in focus and, if it is your ListField, get the SelectedIndex and add a (default) Display menu option that will take you user into your display screen
b) As above, but rather than overriding makeMenu provide you ListField specific menu items in a contextmenu. Again the user selects a menu item to get more details ( or another menu item to delete the entry, if that is possible).
You can choose the option that is the best fit for your application.