public WOComponent editAction() {
WOComponent returnPage = null;
if (previousPage() == null) {
String editConfigurationName = (String)d2wContext().valueForKey("editConfigurationName");
EditPageInterface editPage;
if(editConfigurationName != null && editConfigurationName.length() > 0) {
editPage = (EditPageInterface)D2W.factory().pageForConfigurationNamed(editConfigurationName,session());
} else {
editPage = D2W.factory().editPageForEntityNamed(object().entityName(),session());
}
Object value = d2wContext().valueForKey("useNestedEditingContext");
boolean createNestedContext = ERXValueUtilities.booleanValue(value);
EOEnterpriseObject object = ERXEOControlUtilities.editableInstanceOfObject(object(), createNestedContext);
editPage.setObject(object);
editPage.setNextPage(nextPage());
returnPage = (WOComponent)editPage;
}
return returnPage != null ? returnPage : previousPage();
}