New Posts New Posts RSS Feed: UI not told when entity is dirty
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

UI not told when entity is dirty

 Post Reply Post Reply
Author
skingaby View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 23-Apr-2008
Location: United States
Posts: 146
Post Options Post Options   Quote skingaby Quote  Post ReplyReply Direct Link To This Post Topic: UI not told when entity is dirty
    Posted: 29-Jul-2009 at 6:51am
I see that I can know if an Entity is dirty by checking the entityItem.EntityAspect.HasChanges property. I can also get details about whether the entity is Added or Modified by examining the entityItem.EntityAspect.EntityState property.

When I bind my UI to these properties though, they do not seem to raise the NotifyPropertyChanged event, or even seem to get updated properly at all.

The users want us to enable/disable a Save button based on whether the entity is dirty or not. When I change a property of the entity, I can manually examine the HasChanges and see it is True, but the UI does not receive notification of this change.

How should I be doing this? Thanks, Simon.

Edited by skingaby - 29-Jul-2009 at 6:51am
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 29-Jul-2009 at 10:18am
Not firing PropertyChanged when the EntityState changes is an oversight on our part and we've opened a defect report to fix this.   The EntityManager does not currently implement INotifyPropertyChanged, but we'll also look into that.
 
Meanwhile, listening for EntityChanged events on the EntityGroup (all EntityGroups unfortunately) is one option.
Back to Top
skingaby View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 23-Apr-2008
Location: United States
Posts: 146
Post Options Post Options   Quote skingaby Quote  Post ReplyReply Direct Link To This Post Posted: 29-Jul-2009 at 1:14pm
Is this something we can open a Support Ticket on and get a HotFix for? What is your plan for releasing bug fixes? Thanks.
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 29-Jul-2009 at 4:14pm
We have two support requests open for the issues here - B1120 and F1177.  We generally have maintenance releases every 6 weeks, so the next scheduled one will be in September.  We will include the fix for the problem with not firing PropertyChanged for Entity properties, such as EntityState, in that release.
Back to Top
skingaby View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 23-Apr-2008
Location: United States
Posts: 146
Post Options Post Options   Quote skingaby Quote  Post ReplyReply Direct Link To This Post Posted: 29-Jul-2009 at 5:38pm
Good to hear a fix is pending. Sad that it will be September. We have to have this working and in the hands of users by mid-August. I think we can use the EntityGroup as a work around. I set up a few unit tests and the changed event is firing properly there. I look forward to pulling that kludge out though when we can bind directly to the EntityState. Thanks.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down