
Classes | |
| class | ERCCore |
| class | ERCCreate |
| class | ERCEdit |
| class | ERCInspect |
| class | ERCQuery |
| class | ERCSingleObject |
| class | ERD2WController |
Public Member Functions | |
| ERD2WController | controllerForName (String controllerName, WOSession session) |
| ERD2WController | controllerForTaskAndEntityNamed (String task, String entityName, WOSession session) |
| ERD2WControllerFactory () | |
Static Public Member Functions | |
| static ERD2WControllerFactory | controllerFactory () |
Protected Member Functions | |
| ERD2WController | controllerInstanceWithContext (D2WContext d2wContext) |
Static Private Attributes | |
| static final Logger | log = Logger.getLogger(ERD2WControllerFactory.class) |
public WOActionResults TestEditAction() {
ERD2WControllerFactory.ERCCreate erc = (ERD2WControllerFactory.ERCCreate)ERD2WControllerFactory.controllerFactory().controllerForName("CreateUser", session());
erc.setFinalPage(previousPageFromRequest());
erc.setPrimaryKeyValue(primaryKeyFromRequest());
return (WOActionResults)erc.firstPage();
}
They can be subclassed and you can change the flow of your app without the need to create subclasses of your pages - which spares you the hassle to deal with the duplicated HTML. A controller gets instantiated via a D2W rule like:(controllerName = "EditDocument") => controllerClassName = "er.directtoweb.ERD2WControllerFactory$ERCEdit"controllerName <> null => pageConfiguration = controllerName [KeyValueAssignment] [0]The ERD2WControllerFactory is not heavily tested and the API might change. Especially that the controller subclasses are inner classes of this factory is subject to change. Feedback would be very welcome.
Public constructor
| static ERD2WControllerFactory controllerFactory | ( | ) | [static] |
Gets the D2W factory cast as an ERD2WControllerFactory object.
| ERD2WController controllerForName | ( | String | controllerName, | |
| WOSession | session | |||
| ) |
| ERD2WController controllerForTaskAndEntityNamed | ( | String | task, | |
| String | entityName, | |||
| WOSession | session | |||
| ) |
| ERD2WController controllerInstanceWithContext | ( | D2WContext | d2wContext | ) | [protected] |
final Logger log = Logger.getLogger(ERD2WControllerFactory.class) [static, private] |
logging support
Reimplemented from ERD2WFactory.
1.5.8