Package com.webobjects.directtoweb

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


        // 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());
        ((D2WPage) result).setLocalContext(newContext);
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("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());
        ((D2WPage) result).setLocalContext(newContext);
        return result;
View Full Code Here

        // 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());
        ((D2WPage) result).setLocalContext(newContext);
        return result;
    }
View Full Code Here

        // 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());
        ((D2WPage) result).setLocalContext(newContext);
        return result;
    }
View Full Code Here

    public WOComponent pageForTaskSubTaskAndEntityNamed(String task, String subtask, String entityName, WOSession session) {
        myCheckRules();
        D2WContext newContext = ERD2WContext.newContext(session);
        newContext.setTask(task);
        newContext.setEntity(_entityNamed(entityName, session));
        newContext.takeValueForKey(subtask, "subTask");
        WOComponent result = WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
        ((D2WPage) result).setLocalContext(newContext);
        return result;
    }
View Full Code Here

        // resetting the cache when setting a new page configuration prevents
        // this
        D2WContext subContext = (D2WContext) valueForKey("subContext");
        ERD2WUtilities.resetContextCache(subContext);
        subContext.setDynamicPage((String) valueForBinding("_dynamicPage"));
        subContext.takeValueForKey(D2WModel.One, D2WModel.FrameKey);
        subContext.takeValueForKey(session(), D2WModel.SessionKey);
    }

    private String _pageConfiguration;
View Full Code Here

        // this
        D2WContext subContext = (D2WContext) valueForKey("subContext");
        ERD2WUtilities.resetContextCache(subContext);
        subContext.setDynamicPage((String) valueForBinding("_dynamicPage"));
        subContext.takeValueForKey(D2WModel.One, D2WModel.FrameKey);
        subContext.takeValueForKey(session(), D2WModel.SessionKey);
    }

    private String _pageConfiguration;

    public void maybeResetCaches() {
View Full Code Here

    public static D2WContext makeSubContextForTaskAndEntity(String s, EOEntity eoentity, WOSession wosession) {
        D2WContext d2wcontext = ERD2WContext.newContext(wosession);
        d2wcontext.setTask(s);
        d2wcontext.setEntity(eoentity);
        d2wcontext.takeValueForKey(D2WModel.One, D2WModel.FrameKey);
        return d2wcontext;
    }

    public static D2WContext makeSubContextForDynamicPageNamed(String s, WOSession wosession) {
        D2WContext d2wcontext = ERD2WContext.newContext(wosession);
View Full Code Here

        D2WContext d2wcontext = ERD2WContext.newContext(wosession);
        d2wcontext.setDynamicPage(s);
        // NOTE AK: for whatever reason, when you set a page config
        d2wcontext.setEntity(d2wcontext.entity());
        d2wcontext.setTask(d2wcontext.task());
        d2wcontext.takeValueForKey(D2WModel.One, D2WModel.FrameKey);
        return d2wcontext;
    }

    @Override
    public void validationFailedWithException(Throwable e, Object value, String keyPath) {
View Full Code Here

                    D2WContext context = (D2WContext) sender.valueForKey("d2wContext");
                    Object o = ex.object();

                    if (o instanceof EOEnterpriseObject) {
                        EOEnterpriseObject eo = (EOEnterpriseObject) o;
                        context.takeValueForKey(eo.entityName(), "entityName");
                        context.takeValueForKey(ex.propertyKey(), "propertyKey");
                    }
                    ((ERXValidationException) exception).setContext(context);
                }
                log.info("Validation Exception: " + exception + exception.getMessage());
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.