} else if(result instanceof ERD2WListPage) { dg = ((ERD2WListPage)result).displayGroup();
} else if(result instanceof ERDListPageInterface) { dg = ((ERDListPageInterface)result).displayGroup();
    public static WOComponent printerFriendlyVersion(D2WContext d2wContext, WOSession session, EODataSource dataSource, WODisplayGroup displayGroup) {        ListPageInterface result=(ListPageInterface)ERDirectToWeb.printerFriendlyPageForD2WContext(d2wContext,session);        result.setDataSource(dataSource);        WODisplayGroup dg = null;        if(result instanceof D2WListPage) {            dg = ((D2WListPage)result).displayGroup();        } else if(result instanceof ERD2WListPage) {            dg = ((ERD2WListPage)result).displayGroup();        } else {            try {                dg = (WODisplayGroup)((WOComponent)result).valueForKey("displayGroup");            } catch(Exception ex) {                log.warn("Can't get displayGroup from page of class: " + result.getClass().getName());            }        }        if(dg != null) {            dg.setSortOrderings(displayGroup.sortOrderings());            dg.setNumberOfObjectsPerBatch(displayGroup.allObjects().count());            dg.updateDisplayedObjects();        }        return (WOComponent)result;    }