Coming from .net I'm used to having a drop down expose the index, value and text elements for a selected item.
Now that I'm looking at a spinner control I see that you can only really get two of these - the index and text. I need the value for database lookups.
What is the best strategy for handling this situation? The one I'm thinking of is to declare a map, squirt the data into that map (thus I have, index, value and text) then when the user makes a selection, I use the selected index of the spinner as the index in the page and hey presto I can get the value.
Am I right in saying that this is the best approach? Is it my imagination or is the spinner a somewhat lacking control?
Regards,
Jon
Now that I'm looking at a spinner control I see that you can only really get two of these - the index and text. I need the value for database lookups.
What is the best strategy for handling this situation? The one I'm thinking of is to declare a map, squirt the data into that map (thus I have, index, value and text) then when the user makes a selection, I use the selected index of the spinner as the index in the page and hey presto I can get the value.
Am I right in saying that this is the best approach? Is it my imagination or is the spinner a somewhat lacking control?
Regards,
Jon