EOEntity newEntity=entityName!=null ? EOModelGroup.defaultGroup().entityNamed(entityName) : null;
EOEntity newEntity = _entityNamed(entityName,session);
    public WOComponent pageForTaskAndEntityNamed(String task, String entityName, WOSession session) {        myCheckRules();        D2WContext newContext=new D2WContext(session);        newContext.setTask(task);        EOEntity newEntity=entityName!=null ? EOModelGroup.defaultGroup().entityNamed(entityName) : null;        if (newEntity!=null) newContext.setEntity(newEntity);        String config="__"+task+"__"+entityName;        // saves 2 significant keys, task and entity!        newContext.takeValueForKey(config,"pageConfiguration");                WOComponent newPage=WOApplication.application().pageWithName(newContext.pageName(),session.context());        if (newPage instanceof D2WComponent) {            ((D2WComponent)newPage).setLocalContext(newContext);        }        return newPage;    }