From: Mike S. <ms...@md...> - 2005-09-28 20:02:15
|
In WOToOneRelationship and WOToManyRelationship, if the currently selected object comes from a different editingContext as the one that was used internally, the selection object doesn't match the one in _theList, so it isn't preselected. This in particular happens when the sourceObject is not an EO, so it uses session.defaultEditingContext(). These short little patches basically localInstance the selection into the proper editingContext. Index: WOToOneRelationship.java =================================================================== RCS file: /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/ Sources/er/extensions/WOToOneRelationship.java,v retrieving revision 1.16 diff -r1.16 WOToOneRelationship.java 80a81,87 > if (selection != null && selection instanceof EOEnterpriseObject) { > EOEnterpriseObject eo = (EOEnterpriseObject)selection; > if (eo.editingContext() != editingContext()) { > selection = ERXEOControlUtilities.localInstanceOfObject(editingContext(), eo); > } > } > Index: WOToManyRelationship.java =================================================================== RCS file: /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/ Sources/er/extensions/WOToManyRelationship.java,v retrieving revision 1.14 diff -r1.14 WOToManyRelationship.java 80a81,83 > if (oldValues.lastObject() instanceof EOEnterpriseObject) { > oldValues = ERXEOControlUtilities.localInstancesOfObjects(editingContext(), oldValues); > } 96c99 < } \ No newline at end of file --- > } |