Package com.webobjects.directtoweb

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


  @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

        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!";
            }
            throw new IllegalStateException("Couldn't find the dynamic page named " + name + " in your DirectToWeb model."+
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

        }
        EOEntity entity = context.entity();

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

            if(newPage instanceof EditPageInterface && taskName.equals("edit")) {
                prepareEditPage(context, (EditPageInterface)newPage, entityName);
            } else if(newPage instanceof InspectPageInterface) {
                prepareInspectPage(context, (InspectPageInterface)newPage, entityName);
View Full Code Here

     * @return the css classes
     */
    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

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

    @Override
View Full Code Here

    super(aContext);
  }

  public boolean displayHint() {
    D2WContext d2w = (D2WContext) valueForBinding("d2wContext");  
    String task = d2w.task();

    if("inspect".equals(task) || "edit".equals(task)) {
      return true;
    }
    return false;
View Full Code Here

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

  @Override
  public D2WContext d2wContext() {
    D2WContext result = super.d2wContext();
    if (_previousTaskContext == null) {
      _previousTaskContext = result.task();
    } else if (ObjectUtils.notEqual(_previousTaskContext, result.task())) {
      clearTabSectionsContents();
      _previousTaskContext = result.task();
    }
    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.