Package com.webobjects.directtoweb

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


        if (d2wContext != null) {
            NSMutableDictionary d2wInfo = informationForD2WContext(d2wContext);
            if (component instanceof ERD2WPage) {
                ERD2WPage currentPage = (ERD2WPage)component;
                String subTask = (String)d2wContext.valueForKey("subTask");
                if ("tab".equals(subTask) || "wizard".equals("subTask")) {
                    NSArray sections = currentPage.sectionsForCurrentTab();
                    d2wInfo.setObjectForKey(sections != null ? sections : "null", "D2W-SectionsContentsForCurrentTab");
                    d2wInfo.removeObjectForKey("D2W-TabSectionsContents");
                }
View Full Code Here


        public WOComponent searchAction(WOComponent currentPage) {
            D2WContext d2wContext = ((D2WComponent)currentPage.parent()).d2wContext();
            EODataSource ds = ((QueryPageInterface)currentPage.parent()).queryDataSource();
            log.info("searchAction: " + ds);
            ListPageInterface listpageinterface = null;
            String listConfigurationName=(String)d2wContext.valueForKey("listConfigurationName");
            if(listConfigurationName==null) {
                listConfigurationName = "__list__" + d2wContext().entity().name();
            }
            listpageinterface = (ListPageInterface)pageForConfigurationNamed(listConfigurationName);
            listpageinterface.setDataSource(ds);
View Full Code Here

        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;
    }

    public WOComponent csvExportPageForD2WContext(D2WContext context, WOSession session) {
View Full Code Here

        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;
    }

    public WOComponent pageForTaskSubTaskAndEntityNamed(String task, String subtask, String entityName, WOSession session) {
View Full Code Here

        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;
    }

    public QueryPageInterface queryPageWithFetchSpecificationForEntityNamed(String fsName, String entityName, WOSession s) {
View Full Code Here

    public String displayNameForPageConfiguration() {
        NSSelector sel = new NSSelector("d2wContext");
        if(sel.implementedByObject(context().page())) {
            D2WContext context = (D2WContext) context().page().valueForKey("d2wContext");
            return (String) context.valueForKey("displayNameForPageConfiguration");
        } else {
            if(_d2wContext == null)
                _d2wContext = ERD2WContext.newContext();
            synchronized(_d2wContext) {
                _d2wContext.setDynamicPage(ERD2WFactory.pageConfigurationFromPage(context().page()));
View Full Code Here

            final int sortOrderingDefinitionCount;
            NSMutableArray sortOrderings = null;
            int i = 0;

            context.setEntity(destinationEntity());
            sortOrderingDefinition = (NSArray)context.valueForKey("defaultSortOrdering");
            sortOrderingDefinitionCount = sortOrderingDefinition != null ? sortOrderingDefinition.count() : 0;

            while (i < sortOrderingDefinitionCount) {
                final String key = (String)sortOrderingDefinition.objectAtIndex(i++);
                final String selectorKey = (String)sortOrderingDefinition.objectAtIndex(i++);
View Full Code Here

     */
    public String cssClassForPageContainerElement() {
        NSMutableArray classes = new NSMutableArray();
        D2WContext d2wContext = d2wContext();
    String task = d2wContext.task();
    String subTask = (String)d2wContext.valueForKey("subTask");
    String elementClassPrefix = ERXStringUtilities.capitalize(task) + "Table";
    classes.addObject(elementClassPrefix);
    if (subTask != null) {
      classes.addObject(ERXStringUtilities.capitalize(task) + ERXStringUtilities.capitalize(subTask) + "Table");
    }
View Full Code Here

        String propertyKey = d2wContext.propertyKey();
        if (propertyKey != null) {
            classes.addObject(propertyKey.replaceAll("\\.", "_"));

            // Required?
            if (ERXValueUtilities.booleanValue(d2wContext.valueForKey("displayRequiredMarker")) && !"query".equals(task())) {
                classes.addObject("required");
            }

            // Has error?
            if (hasValidationExceptionForPropertyKey()) {
View Full Code Here

            if (hasValidationExceptionForPropertyKey()) {
                classes.addObject("error");
            }

            // Explicitly defined class(es).
            NSArray explicitClasses = ERXValueUtilities.arrayValueWithDefault(d2wContext.valueForKey(cssKey), NSArray.EmptyArray);
            if (explicitClasses.count() > 0) {
                classes.addObjectsFromArray(explicitClasses);
            }
        }
        return classes.componentsJoinedByString(" ");
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.