pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Leclaire <zeusvi...@gmail.com>
Subject Re: RowEditor and db
Date Thu, 14 Oct 2010 13:24:39 GMT
Hi!

In fact, it's not really easy to use. There are several things which
prevents to use easily these listeners to process modification on db.

Firstly, changesSaved or itemUpdated are always fired, even if there is no
changes which were effectively done, it's not really logic. Method
"previewSaveChanges" in RowEditorListener should test if a modification was
really done before to vote Approve.

Secondly, changesSaved has a parameter "columnIndex", but it consider only
the input column, but when we are in roweditMode, we can change all columns.
Maybe have an array with all modified columns could be a good thing in order
to have easily the list of columns which was modified during the edition.
I have more difficulties to see how implement a such system. Nevertheless, I
think the best place is in "previewSaveChanges" in RowEditorListener.
Indeed, the previewSaveChange method can fire the db modification and if
it's not effective physically in db, it's normal to reject the modification
on the display. However, I don't know how the system can react due to
latency delay inherent to database process.



After writing this, I think I should rather write a jira ticket!


Bye,
Thomas

2010/10/14 Greg Brown <gkbrown@mac.com>

> I'm not intimately familiar with that code, but I believe you can listen
> for TableView.RowEditor#changesSaved() on the row editor. You could also
> listen for ListListener#itemUpdated() on your model.
>
> On Oct 13, 2010, at 9:16 AM, Thomas Leclaire wrote:
>
> > Hi,
> >
> > I try to use the rowEditor example with a database.
> >
> > I have no problem to get data from my db (as a List<MyObject>) and
> display it in a tableview defined in bxml.
> > Thanks to the example, I can also edit this data in the display window.
> >
> > But obviously, modifications are not automatically done in db.
> > Is there an easy way to get the "modification event" (when row is
> validated by user) to process to the modification in db ?
> >
> >
> > Thanks for help,
> > Thomas
>
>

Mime
View raw message