Getting field value from SQLcontainer

Hi! I’m new to Vaadin and Java world, dut have some expirience in pl\sql (if it matters).
I have an issue with using
SQLcontainer
and need your help.

So, in my application I query Oracle database using vaadin
FreeFormQuery
like this:

“SELECT text_field , number_field
FROM table”
.

After that, I hope, my
SQLcontainer
contains some kind of a table data. I want to use
text_field
it to fill a
ListSelect
, but I can’t.

  1. How can I choose a field, whiich must be displayed in
    ListSelect
    ? Right now I have
    ListSelect
    filled with
    number_field
    data, and I want to see
    text_field
    data there. Is it possible to do it without cycle (my associates use cycle and .addItem() method, but is there an easyer way?);

  2. Suppose, I have my
    ListSelect
    filled right. How can I get a
    number_field
    value, which matches selected
    text_field
    value from the
    ListSelect
    ? (my associates use ArrayList class, and I’m not sure that i clearly understand how it works. Is there an easy way?)

Excuse my possible mistakes, I have had lack of english practice during last years.