Package com.webobjects.directtoweb

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


  @Override
    public WOComponent pageForConfigurationNamed(String name, WOSession s) {
        myCheckRules();
        D2WContext d2wcontext = ERD2WContext.newContext(s.context().session());
        d2wcontext.setDynamicPage(name);
        if (d2wcontext.task() == null || d2wcontext.entity() == null) {
            String reason = null;
            if (d2wcontext.task() == null && d2wcontext.entity() == null) {
                reason = "task and entity is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
            } else if (d2wcontext.task() == null) {
                reason = "task is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
View Full Code Here


        myCheckRules();
        D2WContext d2wcontext = ERD2WContext.newContext(s.context().session());
        d2wcontext.setDynamicPage(name);
        if (d2wcontext.task() == null || d2wcontext.entity() == null) {
            String reason = null;
            if (d2wcontext.task() == null && d2wcontext.entity() == null) {
                reason = "task and entity is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
            } else if (d2wcontext.task() == null) {
                reason = "task is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
            } else if (d2wcontext.entity() == null) {
                reason = "entity is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
View Full Code Here

            String reason = null;
            if (d2wcontext.task() == null && d2wcontext.entity() == null) {
                reason = "task and entity is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
            } else if (d2wcontext.task() == null) {
                reason = "task is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
            } else if (d2wcontext.entity() == null) {
                reason = "entity is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
            }
            throw new IllegalStateException("Couldn't find the dynamic page named " + name + " in your DirectToWeb model."+
                    reason);
        }
View Full Code Here

                reason = "entity is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!";
            }
            throw new IllegalStateException("Couldn't find the dynamic page named " + name + " in your DirectToWeb model."+
                    reason);
        }
        return pageWithContextTaskEntity(d2wcontext, d2wcontext.task(), d2wcontext.entity().name(), s.context());
//      return super.pageForConfigurationNamed(name, s);
      
    }

    private EOEntity _entityNamed(String entityName, WOSession session) {
View Full Code Here

  @Override
    public EditPageInterface editPageForNewObjectWithConfigurationNamed(String configurationName, WOSession session) {
        EditPageInterface epi = (EditPageInterface) pageForConfigurationNamed(configurationName, session);
        EOEditingContext peerContext = ERXEC.newEditingContext(session.defaultEditingContext().parentObjectStore());
        D2WContext d2wcontext = ((D2WPage) epi).d2wContext();
        EOEnterpriseObject newObject = _newObjectWithEntity(d2wcontext.entity(), peerContext);
        epi.setObject(newObject);
        peerContext.hasChanges();
        return epi;
    }
View Full Code Here

            context = ((D2WPage)newPage).d2wContext();
        } else {
            context = ERD2WContext.newContext(session());
            context.setDynamicPage(anActionName);
        }
        EOEntity entity = context.entity();

        if(entity != null) {
            String entityName = entity.name();
            String taskName = context.task();
View Full Code Here

    public static D2WContext makeSubContextForDynamicPageNamed(String s, WOSession wosession) {
        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;
    }
View Full Code Here

 
  @Override
  public D2WContext d2wContext() {
    D2WContext result = super.d2wContext();
    if (_cachedEntity == null) {
      _cachedEntity = result.entity();
    } else if (ObjectUtils.notEqual(_cachedEntity, result.entity())) {
      clearTabSectionsContents();
      _cachedEntity = result.entity();
    }
    return super.d2wContext();
View Full Code Here

  @Override
  public D2WContext d2wContext() {
    D2WContext result = super.d2wContext();
    if (_cachedEntity == null) {
      _cachedEntity = result.entity();
    } else if (ObjectUtils.notEqual(_cachedEntity, result.entity())) {
      clearTabSectionsContents();
      _cachedEntity = result.entity();
    }
    return super.d2wContext();
  }
View Full Code Here

    D2WContext result = super.d2wContext();
    if (_cachedEntity == null) {
      _cachedEntity = result.entity();
    } else if (ObjectUtils.notEqual(_cachedEntity, result.entity())) {
      clearTabSectionsContents();
      _cachedEntity = result.entity();
    }
    return super.d2wContext();
  }
}
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.