Package com.webobjects.directtoweb

Examples of com.webobjects.directtoweb.InspectPageInterface


          context._setPageElement(page);
          context._setCurrentComponent(page);
          String task = ERD2WFactory.taskFromPage(page);
          String entityName = ERD2WFactory.entityNameFromPage(page);
          if (page instanceof InspectPageInterface) {
            InspectPageInterface ipi = (InspectPageInterface) page;
            ipi.setObject(EOUtilities.createAndInsertInstance(ec, entityName));
            ipi.setNextPage(page);
          } else if (page instanceof ListPageInterface) {
            ListPageInterface lpi = (ListPageInterface) page;
            lpi.setDataSource(ERXEOControlUtilities.dataSourceForArray(ec, entityName, new NSArray(EOUtilities.createAndInsertInstance(ec, entityName))));
            lpi.setNextPage(page);
          } else if (page instanceof SelectPageInterface) {
View Full Code Here


    }
    return result;
  }

  public WOComponent inspectObjectAction() {
    InspectPageInterface ipi;
    String inspectConfigurationName = (String) d2wContext().valueForKey("inspectConfigurationName");
    log.debug("inspectConfigurationName: " + inspectConfigurationName);
    if (inspectConfigurationName != null) {
      ipi = (InspectPageInterface) D2W.factory().pageForConfigurationNamed(inspectConfigurationName, session());
    } else {
      ipi = D2W.factory().inspectPageForEntityNamed(object().entityName(), session());
    }
    ipi.setObject(object());
    ipi.setNextPage(context().page());
    return (WOComponent) ipi;
  }
View Full Code Here

   
    public WOComponent inspectObjectAction() {

        WOComponent returnedValue = null;
        String configuration = (String) valueForBinding("inspectConfigurationName");
        InspectPageInterface epi = (InspectPageInterface) D2W.factory().pageForConfigurationNamed(configuration, session());
        epi.setNextPage(context().page());

        boolean useExistingEditingContext = ERXValueUtilities.booleanValue(valueForBinding("useExistingEditingContext"));

        if (useExistingEditingContext) {
            // We just want to use the object's exiting editing context to inspect it
            epi.setObject(object());
            returnedValue = (WOComponent) epi;
        } else {
            EOEditingContext context = ERXEC.newEditingContext();
            //CHECKME ak: I don't remember why we would use a local instance when we just want to inspect...
            context.lock();
            try {
                EOEnterpriseObject localObject = EOUtilities.localInstanceOfObject(context, object());
                epi.setObject(localObject);
                context.hasChanges(); // Ensuring it survives.
                returnedValue = (WOComponent) epi;
            } finally {
                context.unlock();
            }
View Full Code Here

    @Override
    public WOComponent inspectAction() {
        if(item!=null){
            String inspectConfigurationName=(String)d2wContext().valueForKey("inspectConfigurationName");
            if(inspectConfigurationName!=null && item!=null){
                InspectPageInterface inspectPage=(InspectPageInterface)D2W.factory().pageForConfigurationNamed(inspectConfigurationName,
                                                                                                               session());
                inspectPage.setObject(item);
                inspectPage.setNextPage(context().page());
                System.out.println(inspectPage);
                return (WOComponent)inspectPage;
            }
        }
        return super.inspectAction();
View Full Code Here

    public WOComponent toOneAction() {
        EOEnterpriseObject anEO = browserItem;
        if(anEO == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("Inspect" + anEO.entityName(), session());
            inspectPage.setObject(anEO);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

        Object value = objectKeyPathValue();
        if (value instanceof EOEnterpriseObject) {
            eo = (EOEnterpriseObject) value;
        }
        String pageConfigurationName = (String)valueForBinding("editConfigurationName");
        InspectPageInterface ipi = (InspectPageInterface)D2W.factory().pageForConfigurationNamed(pageConfigurationName, session());
       eo = ERXEOControlUtilities.editableInstanceOfObject(eo, booleanValueForBinding("useNestedEditingContext"));
      ipi.setNextPage(context().page());
      ipi.setObject(eo);
      return (WOComponent)ipi;
    }
View Full Code Here

    @Override
    public WOComponent inspectAction() {
        if(item == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("AjaxInspect" + item.entityName(), session());
            inspectPage.setObject(item);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

    public WOComponent toOneAction() {
        EOEnterpriseObject anEO = _eo();
        if(anEO == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("AjaxInspect" + anEO.entityName(), session());
            inspectPage.setObject(anEO);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

    public WOComponent toOneAction() {
        EOEnterpriseObject anEO = browserItem;
        if(anEO == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("AjaxInspect" + anEO.entityName(), session());
            inspectPage.setObject(anEO);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

    public WOComponent toOneAction() {
        EOEnterpriseObject anEO = object();
        if(anEO == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("AjaxInspect" + anEO.entityName(), session());
            inspectPage.setObject(anEO);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

TOP

Related Classes of com.webobjects.directtoweb.InspectPageInterface

Copyright © 2018 www.massapicom. 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.