You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Nuno Sousa <wi...@gmail.com> on 2008/05/13 15:38:38 UTC

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

RE: DataTable inputtext binding

Posted by Guy Bashan <gu...@gmail.com>.
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@gmail.com] 
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