Package com.webobjects.directtoweb

Examples of com.webobjects.directtoweb.D2WPage


  public WOComponent returnAction() {
    WOComponent page = super.returnAction();
    boolean useAjaxWhenEmbedded = ERXValueUtilities.booleanValue(d2wContext().valueForKey(Keys.useAjaxControlsWhenEmbedded));
    if (useAjaxWhenEmbedded) {
      if (parent() != null) {
        D2WPage parent = (D2WPage)ERD2WUtilities.enclosingPageOfClass(this, D2WPage.class);
        if (parent != null)
          parent.takeValueForKeyPath(null, "d2wContext.inlineTask");
      }
    }
    return page;
  }
View Full Code Here


    super(context);
  }

  public D2WContext d2wContext() {
    if (context().page() instanceof D2WPage) {
      D2WPage d2wPage = (D2WPage) context().page();
      return d2wPage.d2wContext();
    }
    return null;
  }
View Full Code Here

        d2wContext().takeValueForKey(localObj, Keys.objectPendingDeletion);
      } else {
        ConfirmPageInterface nextPage = (ConfirmPageInterface)D2W.factory().pageForConfigurationNamed((String)valueForBinding("confirmDeleteConfigurationName"), session());
        nextPage.setConfirmDelegate(new ERDDeletionDelegate(object(), dataSource(), context().page()));
        nextPage.setCancelDelegate(new ERDPageDelegate(context().page()));
        D2WPage d2wPage = ((D2WPage)nextPage);

        String message = ERXLocalizer.currentLocalizer().localizedTemplateStringForKeyWithObject("ERDTrashcan.confirmDeletionMessage", d2wContext());
        nextPage.setMessage(message);
        d2wPage.setObject(object());
        result = (WOActionResults)nextPage;
      }
        return result;
    }
View Full Code Here

        public Object valueForKey(String key) {
            String keyPath = ERXStringUtilities.uncapitalize(key);
            WOActionResults result = (WOActionResults) NSKeyValueCoding.DefaultImplementation.valueForKey(this, keyPath);
            if (result instanceof D2WPage) {
                D2WPage page = (D2WPage) result;
                String state = ERXStringUtilities.capitalize(_key) + "." + key;
                page.d2wContext().takeValueForKey(state, "navigationState");
            }
            return result;
        }
View Full Code Here

      return pageName;
    }
   
    public D2WContext d2wContext() {
      if (context().page() instanceof D2WPage) {
      D2WPage d2wPage = (D2WPage) context().page();
      return d2wPage.d2wContext();
    }
      return null;
    }
View Full Code Here

    @Override
    public WOComponent pageWithContextTaskEntity(D2WContext d2wcontext, String task, String entity, WOContext wocontext) {
      WOComponent nextPage = super.pageWithContextTaskEntity(d2wcontext, task, entity, wocontext);
      if (nextPage instanceof D2WPage) {
        String oldState = ERXNavigationManager.manager().navigationStateForSession(wocontext.session()).stateAsString();
        D2WPage page = (D2WPage) nextPage;
        page.setNextPage(currentPage());
        String newState = (String) page.d2wContext().valueForKey("navigationState");
        if(oldState != null) {
          if(newState == null || oldState.startsWith(newState)) {
            page.d2wContext().takeValueForKey(oldState, "navigationState");
          }
        }
        log.debug("Create page: " + page.d2wContext().dynamicPage() + " old: " + oldState + " news: " + newState);

      }
        return nextPage;
    }
View Full Code Here

TOP

Related Classes of com.webobjects.directtoweb.D2WPage

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.