Print Page | Close Window

UI not told when entity is dirty

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1399
Printed Date: 22-Sep-2025 at 4:22am


Topic: UI not told when entity is dirty
Posted By: skingaby
Subject: UI not told when entity is dirty
Date 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.



Replies:
Posted By: kimj
Date 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.


Posted By: skingaby
Date 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.


Posted By: kimj
Date 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.


Posted By: skingaby
Date 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.



Print Page | Close Window