Package com.webobjects.directtoweb

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


                    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());
                editingContext.revert();
View Full Code Here


   
    public WOComponent printerFriendlyVersion() {
        WOComponent result = null;
        if(d2wContext() == null) {
            D2WContext dummyContext = ERD2WContext.newContext();
            dummyContext.takeValueForKey(object(), "object");
            dummyContext.setEntity(EOUtilities.entityNamed(object().editingContext(),object().entityName()));
            dummyContext.setTask("inspect");
           
            result=ERD2WFactory.erFactory().printerFriendlyPageForD2WContext(dummyContext,session());
            ((EditPageInterface)result).setObject(object());
View Full Code Here

        cb.entityName=d2wContext().entity().name();
        cb.list=(NSArray)valueForBinding("list");
        epi.setNextPageDelegate(cb);
        WOComponent result=(WOComponent)epi;
        D2WContext editContext=(D2WContext)result.valueForKey("d2wContext");
        editContext.takeValueForKey("massModify", "subTask");

        // we then wipe any default value that might have been put in the EO
        NSArray dpk=(NSArray)editContext.valueForKey("displayPropertyKeys");
        cb.displayPropertyKeys=dpk;
        for (Enumeration e=dpk.objectEnumerator(); e.hasMoreElements();) {
View Full Code Here

                    D2WContext context = 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

                    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());
                    editingContext.revert();
View Full Code Here

                throw new IllegalStateException("entityName or d2wContext can't both be null.");
            qpi = D2W.factory().queryPageForEntityNamed(entityName, session());
        }
        qpi.setNextPageDelegate(new _FilterDelegate(context().page(), displayGroup()));
        D2WContext d2wContext = (D2WContext)((WOComponent)qpi).valueForKey("d2wContext");
        d2wContext.takeValueForKey("filter", "subTask");
        return (WOComponent)qpi;
    }

    public WOComponent clearFilter(){
        displayGroup().setQualifier(null);
View Full Code Here

public class ERD2RestDefaultSecurityDelegate implements IERXRestSecurityDelegate {

    protected boolean booleanValueForKey(String key, String propertyKey, EOEnterpriseObject eo) {
        D2WContext context = ERDirectToRest.d2wContext();
        context.setPropertyKey(propertyKey);
        context.takeValueForKey(eo, "object");
        return ERXValueUtilities.booleanValue(context.valueForKey(key));
    }
   
    public boolean canDeleteObject(EOEntity entity, EOEnterpriseObject eo, ERXRestContext context) {
        return booleanValueForKey("restCanDelete", null, eo);
View Full Code Here

                    D2WContext context = 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

                    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());
                    editingContext.revert();
View Full Code Here

        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");
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.