Oh... I see.
In that case, the dataTable model still cannot be used to propagate the
changes back to the database.
What I am doing right now is having a bean/class to store the values of
each column of the dataTable. I also have an attribute called "dirty" to
see if any of the values has changed.
There is a class to update the "dirty" rows in this dataTable. At this
moment, the update is done individually for each row (calling "update
BLAH set blah=blah"). I can't think of any other way to deal with this
issue.
I really want JSTL Result or ResultSet to behave like a bean so that
changing the row values is a snap. Maybe it will never become true!
Thanks
--Doug
-----Original Message-----
From: Sean Schofield [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 18, 2005 4:08 PM
To: MyFaces Discussion
Subject: Re: dataTable question

Actually its designed to make sure that the data model underlying the
table does not change until newly posted values are compared against
the old data and change events are fired.

Otherwise it is possible that the data in the db changes while user is
looking at data.  When they post, there are erroneous changes unless
you temporarily preserve the data model.  The data model is then
updated in the normal manner during renders response.

At least this is how I understand it.  I haven't used it yet though.

HTH,
sean


On Wed, 16 Feb 2005 11:46:32 -0600 (CST), Duc Ly (Doug) <[EMAIL PROTECTED]>
wrote:
> MyFaces dataTable has an attribute preserveModel. I wonder if this
> atttribute allows user to change the displayed values in a dataTable
and
> commit/update the changes to a backend database.
> Does anybody has a reference or documentation of this feature?
> Thanks
> Doug
> 
> --------------------------------------------------------------------
> Public key : http://www.cs.uh.edu/~dmly
> or           http://www.keyserver.net
>

Reply via email to