/** * Used to show/hide the confirmation dialog */ public boolean showDialog() { boolean show = object() != null && ERXEOControlUtilities.eoEquals(object(), (EOEnterpriseObject)d2wContext().valueForKey(Keys.objectPendingDeletion)); return show; }
/** * Called when an {@link ERMDActionButton} changes the related object. */ @SuppressWarnings("unchecked") public void relatedObjectDidChange(NSNotification notif) { NSDictionary<String, Object>userInfo = notif.userInfo(); if (userInfo != null) { Object key = userInfo.valueForKey("propertyKey"); EOEnterpriseObject obj = (EOEnterpriseObject)userInfo.valueForKey("object"); if (propertyKey() != null && propertyKey().equals(key) && ERXEOControlUtilities.eoEquals(object(), obj)) { _currentSelection = null; } } }
/** * Called when an {@link ERMDActionButton} changes the related object. * Forces the displayGroup to fetch. */ @SuppressWarnings("unchecked") public void relatedObjectDidChange(NSNotification notif) { NSDictionary<String, Object>userInfo = notif.userInfo(); if (userInfo != null) { Object key = userInfo.valueForKey("propertyKey"); EOEnterpriseObject obj = (EOEnterpriseObject)userInfo.valueForKey("object"); if (relationshipKey() != null && relationshipKey().equals(key) && ERXEOControlUtilities.eoEquals(masterObject(), obj)) { relationshipDisplayGroup().fetch(); // when the last object of the last batch gets removed, select the new last batch if (relationshipDisplayGroup().currentBatchIndex() > relationshipDisplayGroup().batchCount()) { relationshipDisplayGroup().setCurrentBatchIndex(relationshipDisplayGroup().batchCount()); } } } if (notif.userInfo().valueForKey("ajaxNotificationCenterId") == null) { // the change notification was not sent from ERMDAjaxNotificationCenter postChangeNotification(); } }
(masterObject() != null && !ERXEOControlUtilities.eoEquals(masterObject(), eo))) {