From: Anjo K. <an...@us...> - 2002-05-01 09:01:00
|
Update of /cvsroot/wonder/ProjectWonder/Frameworks/ERDirectToWebJava In directory usw-pr-cvs1:/tmp/cvs-serv5911 Modified Files: ERD2WEditToManyRelationship.java Log Message: added "restrictingFetchSpecification" d2w key to set a FS to limit the choice of keys Index: ERD2WEditToManyRelationship.java =================================================================== RCS file: /cvsroot/wonder/ProjectWonder/Frameworks/ERDirectToWebJava/ERD2WEditToManyRelationship.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ERD2WEditToManyRelationship.java 9 Feb 2002 07:52:51 -0000 1.2 --- ERD2WEditToManyRelationship.java 1 May 2002 09:00:56 -0000 1.3 *************** *** 9,12 **** --- 9,15 ---- import com.webobjects.appserver.*; import com.webobjects.directtoweb.*; + import com.webobjects.eoaccess.*; + import com.webobjects.eocontrol.*; + import er.extensions.*; public class ERD2WEditToManyRelationship extends D2WEditToManyRelationship { *************** *** 21,25 **** public Object restrictedChoiceList() { String restrictedChoiceKey=(String)d2wContext().valueForKey("restrictedChoiceKey"); ! return restrictedChoiceKey!=null && restrictedChoiceKey.length()>0 ? valueForKeyPath(restrictedChoiceKey) : null; } --- 24,36 ---- public Object restrictedChoiceList() { String restrictedChoiceKey=(String)d2wContext().valueForKey("restrictedChoiceKey"); ! if( restrictedChoiceKey!=null && restrictedChoiceKey.length()>0 ) ! return valueForKeyPath(restrictedChoiceKey); ! String fetchSpecName=(String)d2wContext().valueForKey("restrictingFetchSpecification"); ! if(fetchSpecName != null) { ! EORelationship relationship = ERXUtilities.relationshipWithObjectAndKeyPath((EOEnterpriseObject)object(), ! (String)d2wContext().valueForKey("propertyKey")); ! return EOUtilities.objectsWithFetchSpecificationAndBindings(object().editingContext(), relationship.destinationEntity().name(),fetchSpecName,null); ! } ! return null; } |