Package com.webobjects.directtoweb

Examples of com.webobjects.directtoweb.D2WContext.takeValueForKey()


    }

    public ERD2WController controllerForName(String controllerName, WOSession session) {
        myCheckRules();
        D2WContext newContext=ERD2WContext.newContext(session);
        newContext.takeValueForKey(controllerName, "controllerName");
        // give an InstanceCreationAssigment a chance
        ERD2WController c = controllerInstanceWithContext(newContext);

        return c;
    }
View Full Code Here


        newContext.setTask(task);
        EOEntity newEntity=entityName!=null ? EOModelGroup.defaultGroup().entityNamed(entityName) : null;
        if (newEntity!=null) newContext.setEntity(newEntity);
        String controllerName="__"+task+"__"+entityName;
        // saves 2 significant keys, task and entity!
        newContext.takeValueForKey(controllerName,"controllerName");

        ERD2WController c = controllerInstanceWithContext(newContext);

        return c;
    }
View Full Code Here

    public WOComponent printerFriendlyPageForD2WContext(D2WContext context, WOSession session) {
        myCheckRules();
        D2WContext newContext = ERD2WContext.newContext(session);
        String newTask = context.task().equals("edit") ? "inspect" : context.task();
        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("printerFriendly","subTask");
View Full Code Here

        // 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("printerFriendly","subTask");
        newContext.takeValueForKey("printerFriendly", "forcedSubTask");
        newContext.takeValueForKey(context.valueForKey("pageName"), "existingPageName");
        newContext.takeValueForKey(context.valueForKey("subTask"), "existingSubTask");
        newContext.takeValueForKey(context.valueForKey("pageConfiguration"), "pageConfiguration");
        newContext.takeValueForKey(context.entity(), "entity");
        WOComponent result = WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
View Full Code Here

        // 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("printerFriendly","subTask");
        newContext.takeValueForKey("printerFriendly", "forcedSubTask");
        newContext.takeValueForKey(context.valueForKey("pageName"), "existingPageName");
        newContext.takeValueForKey(context.valueForKey("subTask"), "existingSubTask");
        newContext.takeValueForKey(context.valueForKey("pageConfiguration"), "pageConfiguration");
        newContext.takeValueForKey(context.entity(), "entity");
        WOComponent result = WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
        ((D2WPage) result).setLocalContext(newContext);
View Full Code Here

        // is 'computable' (subTask is since a rule can fire to give a default)
        // or an external output
        //        newContext.takeValueForKey("printerFriendly","subTask");
        newContext.takeValueForKey("printerFriendly", "forcedSubTask");
        newContext.takeValueForKey(context.valueForKey("pageName"), "existingPageName");
        newContext.takeValueForKey(context.valueForKey("subTask"), "existingSubTask");
        newContext.takeValueForKey(context.valueForKey("pageConfiguration"), "pageConfiguration");
        newContext.takeValueForKey(context.entity(), "entity");
        WOComponent result = WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
        ((D2WPage) result).setLocalContext(newContext);
        return result;
View Full Code Here

        // or an external output
        //        newContext.takeValueForKey("printerFriendly","subTask");
        newContext.takeValueForKey("printerFriendly", "forcedSubTask");
        newContext.takeValueForKey(context.valueForKey("pageName"), "existingPageName");
        newContext.takeValueForKey(context.valueForKey("subTask"), "existingSubTask");
        newContext.takeValueForKey(context.valueForKey("pageConfiguration"), "pageConfiguration");
        newContext.takeValueForKey(context.entity(), "entity");
        WOComponent result = WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
        ((D2WPage) result).setLocalContext(newContext);
        return result;
    }
View Full Code Here

        //        newContext.takeValueForKey("printerFriendly","subTask");
        newContext.takeValueForKey("printerFriendly", "forcedSubTask");
        newContext.takeValueForKey(context.valueForKey("pageName"), "existingPageName");
        newContext.takeValueForKey(context.valueForKey("subTask"), "existingSubTask");
        newContext.takeValueForKey(context.valueForKey("pageConfiguration"), "pageConfiguration");
        newContext.takeValueForKey(context.entity(), "entity");
        WOComponent result = WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
        ((D2WPage) result).setLocalContext(newContext);
        return result;
    }
View Full Code Here

    }

    public WOComponent csvExportPageForD2WContext(D2WContext context, WOSession session) {
        myCheckRules();
        D2WContext newContext = ERD2WContext.newContext(session);
        newContext.takeValueForKey(context.task(), "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("csv", "forcedSubTask");
View Full Code Here

        newContext.takeValueForKey(context.task(), "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("csv", "forcedSubTask");
        newContext.takeValueForKey(context.valueForKey("pageName"), "existingPageName");
        newContext.takeValueForKey(context.valueForKey("subTask"), "existingSubTask");
        newContext.takeValueForKey(context.valueForKey("pageConfiguration"), "pageConfiguration");
        newContext.takeValueForKey(context.entity(), "entity");
        WOComponent result = WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.