package er.diva.pages; import com.webobjects.appserver.WOComponent; import com.webobjects.appserver.WOContext; import com.webobjects.appserver.WOResponse; import er.ajax.AjaxUtils; import er.directtoweb.pages.ERD2WEditRelationshipPage; import er.diva.ERDIVPageInterface; // Generated by the WOLips Templateengine Plug-in at Jun 4, 2008 2:29:15 PM public class ERDIVEditRelationshipPage extends ERD2WEditRelationshipPage implements ERDIVPageInterface { public ERDIVEditRelationshipPage(WOContext context) { super(context); } /** interface for all the keys used in this pages code */ public static interface Keys extends ERD2WEditRelationshipPage.Keys { public static final String subTask = "forcedSubTask"; } // actions /** * Overridden because the action bound should return. */ @Override public WOComponent selectAction() { super.selectAction(); return returnAction(); } @Override public WOComponent queryAction() { d2wContext().takeValueForKey("list", Keys.subTask); return super.queryAction(); } @Override public WOComponent saveAction() { d2wContext().takeValueForKey("query", Keys.subTask); return super.saveAction(); } @Override public WOComponent displayQueryAction() { if (displayNew()) dataSource().editingContext().revert(); d2wContext().takeValueForKey("query", Keys.subTask); return super.displayQueryAction(); } // accessors public String stylesheet() { return (String) d2wContext().valueForKey(ERDIVPageInterface.Keys.Stylesheet); } public String queryPageConfiguration() { return "QueryEditRelationship" + d2wContext().entity().name(); } public String listPageConfiguration() { return "Select" + d2wContext().entity().name(); } public String newPageConfiguration() { return "EditEditRelationship" + d2wContext().entity().name(); // FIXME: change to CreateEditRelationship } // R/R @Override public void appendToResponse(WOResponse response, WOContext context) { super.appendToResponse(response, context); // add page style sheet if (stylesheet() != null) { AjaxUtils.addStylesheetResourceInHead(context, response, "app", stylesheet()); } } }