Combo problem [message #455164] |
Mon, 09 May 2005 13:35 |
Eclipse User |
|
|
|
Originally posted by: akan.aiqa.com
I can not store a data object for every combo item. What do you suggest
me to do to store key field of the table as well as name field ?
(Because there are records with the same name but having different key
values)
thanks,
aiQa
|
|
|
Re: Combo problem [message #455189 is a reply to message #455164] |
Tue, 10 May 2005 05:02 |
Eclipse User |
|
|
|
Originally posted by: akan.aiqa.com
aiQa wrote:
> I can not store a data object for every combo item. What do you suggest
> me to do to store key field of the table as well as name field ?
>
> (Because there are records with the same name but having different key
> values)
>
> thanks,
> aiQa
I will answer my own question :)
I created an object named ComboData and stored some string values in it.
Then created an ArrayList<ComboData> assign it to combo with setData()
method. I used setText() method of combo in a loop of ArrayList items so
when a user clicks 3th item in the combo I select 3th item in the
ArrayList and read extra data stored in the ComboData object.
I wish to hear if there is a better solution.
|
|
|
Powered by
FUDForum. Page generated in 0.05149 seconds