((EditPageInterface)result).setObject(object());
return result;
}
public WOComponent listPrinterFriendlyVersion() {
D2WContext d2wContext = d2wContext();
WOSession session = session();
WODisplayGroup displayGroup = displayGroup();
EODataSource dataSource = dataSource();
if(dataSource == null) {
if (displayGroup instanceof ERXBatchingDisplayGroup) {
ERXBatchingDisplayGroup dg = (ERXBatchingDisplayGroup) displayGroup;
dataSource = ERXEOControlUtilities.dataSourceForArray(displayGroup.displayedObjects());
} else {
dataSource = ERXEOControlUtilities.dataSourceForArray(displayGroup.allObjects());
}
}
D2WContext newContext = ERD2WContext.newContext(session);
String newTask = d2wContext.task().equals("edit") ? "inspect" : d2wContext.task();
// for editable list pages...
if("list".equals(d2wContext().valueForKey("subTask"))) {
newTask = "list";
}
newContext.takeValueForKey(newTask, "task");
// not using subTask directly here because the cache mechanism relies on
// being able to compute wether this key
// is 'computable' (subTask is since a rule can fire to give a default)
// or an external output
// newContext.takeValueForKey("excel","subTask");
newContext.takeValueForKey("excel", "forcedSubTask");
newContext.takeValueForKey(d2wContext.valueForKey("pageName"), "existingPageName");
newContext.takeValueForKey(d2wContext.valueForKey("subTask"), "existingSubTask");
newContext.takeValueForKey(d2wContext.valueForKey("pageConfiguration"), "pageConfiguration");
newContext.takeValueForKey(d2wContext.entity(), "entity");
ListPageInterface result = (ListPageInterface) WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
((D2WPage) result).setLocalContext(newContext);
result.setDataSource(dataSource);
WODisplayGroup dg = null;
if (result instanceof D2WListPage) {