if(epf instanceof ERDErrorPageInterface) { ((ERDErrorPageInterface)epf).setException(e); }
        public WOComponent nextPage(WOComponent sender) {            WOComponent result=nextPage;            if (eo.editingContext()!=null) { // save was clicked                EOEditingContext ec=er.extensions.ERXExtensions.newEditingContext();                for (Enumeration ob=list.objectEnumerator(); ob.hasMoreElements();) {                    EOEnterpriseObject eoItem=(EOEnterpriseObject)ob.nextElement();                    EOEnterpriseObject localEOItem=EOUtilities.localInstanceOfObject(ec,eoItem);                    System.out.println(localEOItem);                    for (Enumeration e= displayPropertyKeys.objectEnumerator(); e.hasMoreElements();) {                        String key=(String)e.nextElement();                        Object value=eo.valueForKey(key);                        if (value!=null) {                            System.out.println(key+" --> "+value);                            if (value instanceof EOEnterpriseObject) { // assume it is a rel                                EOEnterpriseObject localValue=EOUtilities.localInstanceOfObject(ec,(EOEnterpriseObject)value);                                localEOItem.addObjectToBothSidesOfRelationshipWithKey(localValue,key);                            } else if (!(value instanceof String) || ((String)value).length()>0)                                localEOItem.takeValueForKey(value,key);                        }                    }                }                try {                    ec.saveChanges();                } catch (NSValidation.ValidationException e) {                    String errorMessage = " Could not save your changes: "+e.getMessage()+" ";                    ErrorPageInterface epf=D2W.factory().errorPage(sender.session());                    epf.setMessage(errorMessage);                    epf.setNextPage(nextPage);                    result=(WOComponent)epf;                }            }            return result;        }