Cancel changes made to entities

3 views
Skip to first unread message

Rico Leuthold

unread,
Feb 16, 2011, 4:34:45 PM2/16/11
to flextrine
Hi,

When a user made changes to entities shown in an editable DataGrid,
how do I revert to the "unchanged" state of the entities.

Can this be done using some nifty flextrine methods or what would be
the right strategy?

Thank you & keep up the great work Dave
- rico

Dave Keen

unread,
Feb 17, 2011, 4:01:37 AM2/17/11
to flex...@googlegroups.com
Hey Rico,

One way to do this is to clone each entity using em.detach, then merge them back in using em.merge if you decide to keep the changes.  Version 0.9 of Flextrine (currently in development, but out fairly soon) features a new em.rollback() method which reverts entities to the state they were in when last loaded; this is probably what you really want :)

More information about Flextrine 0.9 can be found here - http://www.actionscriptdeveloper.co.uk/work-on-flextrine-resumes/

Cheers,

Dave
No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.872 / Virus Database: 271.1.1/3447 - Release Date: 02/16/11 08:34:00

Rico Leuthold

unread,
Feb 17, 2011, 5:48:57 AM2/17/11
to flextrine
Hi Dave,

Thank's for the answer.

If you are still on track with the release of version 0.9, I can wait
and will be very happy with the new em.rollback() feature.

- rico

On Feb 17, 10:01 am, Dave Keen <d...@ruffness.com> wrote:
> Hey Rico,
>
> One way to do this is to clone each entity using em.detach, then merge
> them back in using em.merge if you decide to keep the changes.  Version
> 0.9 of Flextrine (currently in development, but out fairly soon)
> features a new em.rollback() method which reverts entities to the state
> they were in when last loaded; this is probably what you really want :)
>
> More information about Flextrine 0.9 can be found here -http://www.actionscriptdeveloper.co.uk/work-on-flextrine-resumes/
>
> Cheers,
>
> Dave
>
> On 16/02/2011 22:34, Rico Leuthold wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > When a user made changes to entities shown in an editable DataGrid,
> > how do I revert to the "unchanged" state of the entities.
>
> > Can this be done using some nifty flextrine methods or what would be
> > the right strategy?
>
> > Thank you&  keep up the great work Dave
Reply all
Reply to author
Forward
0 new messages