Skip to content

Commit

Permalink
Modify ERMD2WEditToOneTypeAhead to support ERMDAjaxNotificationCenter.
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarthez committed Dec 14, 2015
1 parent 8c4b297 commit 2b4cf11
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import er.extensions.foundation.ERXStringUtilities;
import er.extensions.foundation.ERXUtilities;
import er.extensions.foundation.ERXValueUtilities;
import er.modern.directtoweb.components.ERMDAjaxNotificationCenter;
import er.modern.directtoweb.components.buttons.ERMDActionButton;

/**
Expand Down Expand Up @@ -226,6 +227,12 @@ public WOActionResults selectObject() {
object().removeObjectFromBothSidesOfRelationshipWithKey(existingObj, propertyKey());
}
}
// support for ERMDAjaxNotificationCenter
if (ERXValueUtilities.booleanValueWithDefault(d2wContext().valueForKey("shouldObserve"), false)) {
NSNotificationCenter.defaultCenter().postNotification(
ERMDAjaxNotificationCenter.PropertyChangedNotification,
parent().valueForKeyPath("d2wContext"));
}
// NSLog.out.appendln("Select Object Called: " + object().valueForKey(propertyKey()) + " " + searchValue());
return null;
}
Expand Down

0 comments on commit 2b4cf11

Please sign in to comment.