Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Visitor
Aeryris
Posts: 1
Registered: ‎05-17-2013
My Device: 9310, 8900

Sqlite, create list + set item id

Hi, 

 

I have the following database table:

 

id INTEGER,

title TEXT,

content TEXT,

 

e.g. rows

3, title1, desc1

4, title2, desc2

5, title3, desc3

 

I was able to display items like this using Richlist

--------------------

title1

desc1

--------------------

title2

desc2

--------------------

title3

desc3

--------------------

 

My question is:

How can I add row id from db (not visible to the user) to the item so I can use it for future db reference when user presses on item?

 

e.g. 

User presses on first item and it returns db row id which in this case would be 3

 

Thanks

 

 

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Sqlite, create list + set item id

I don't use RichList so not sure if this idea is applicable, but one option would be ti have an array of keys for the items you are displaying and when the user selects the 3rd option, you can use the 3rd entry in your array.  just an idea.