DataTable inputtext binding

View: New views
2 Messages — Rating Filter:   Alert me  

DataTable inputtext binding

by Nuno Sousa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have my dataTable populated via an ArrayList of ArrayLists but that
table row cells are editable (inputText).
How can i associate each inputText field with one position of my
ArrayList of ArrayLists to make changes in the list if the cell
inputText changes?

Any ideas/help are welcome

Regards


--
Ping is just a number timming is everything

RE: DataTable inputtext binding

by bashan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Nuno,

If I understand correct, you don't have to worry about the position in the
list.
The "var" property allows you to access the current object of the list, so
the data will be injected to your object without you being concerned about
it.

For example:
<h:dataTable> value="#{myBean.listCars}" var="car">
        <h:column>
                <h:inputText value="#{car.color}" />
        <h:column>
</h: dataTable>

Guy.



-----Original Message-----
From: Nuno Sousa [mailto:wizard.night@...]
Sent: Tuesday, May 13, 2008 4:39 PM
To: MyFaces Discussion
Subject: DataTable inputtext binding

Hi,

I have my dataTable populated via an ArrayList of ArrayLists but that
table row cells are editable (inputText).
How can i associate each inputText field with one position of my
ArrayList of ArrayLists to make changes in the list if the cell
inputText changes?

Any ideas/help are welcome

Regards


--
Ping is just a number timming is everything