Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOComponent


    }
   
    // Actions
   
    public WOComponent logout() {
        WOComponent redirectPage = pageWithName("WORedirect");
        ((WORedirect) redirectPage).setUrl(D2W.factory().homeHrefInContext(context()));
        session().terminate();
        return redirectPage;
    }
View Full Code Here


        QueryPageInterface newQueryPage = D2W.factory().queryPageForEntityNamed(entityName, session());
        return (WOComponent) newQueryPage;
    }
   
    public WOComponent newObjectForEntityName(String entityName) {
        WOComponent nextPage = null;
        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(entityName, session());
            epi.setNextPage(session().context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
View Full Code Here

     * Appends script to start Ajax.ActivePeriodicalUpdater to the response.
     */
    @Override
    public void appendToResponse(WOResponse response, WOContext context) {
      super.appendToResponse(response, context);
        WOComponent component = context.component();
        response.appendContentString("<script>var AjaxSessionPinger = new Ajax.ActivePeriodicalUpdater('AjaxSessionPinger', '");

        if (booleanValueForBinding("keepSessionAlive", false, component)) {
            response.appendContentString(context.directActionURLForActionNamed("AjaxSessionPing$Action/pingSessionAndKeepAlive", null, context.secureMode(), false));
        } else {
View Full Code Here

    String droppedDraggableID = request.stringFormValueForKey(_draggableIDKeyName);
    if (canSetValueForBinding("droppedDraggableID")) {
      setValueForBinding(droppedDraggableID, "droppedDraggableID");
    }
    if (canSetValueForBinding("droppedObject")) {
      WOComponent page = context.page();
      Object droppedObject = AjaxDraggable.draggableObjectForPage(page, droppedDraggableID);
      setValueForBinding(droppedObject, "droppedObject");
    }
    if (canGetValueForBinding("action")) {
      WOActionResults results = (WOActionResults) valueForBinding("action");
View Full Code Here

        return result;
    }
   
    /** Utility to return the next page in the enclosing page. */
    public static WOComponent nextPageInPage(D2WPage parent) {
        WOComponent result = parent.context().page();
        WOComponent old = parent.context().component();
        try {
            parent.context()._setCurrentComponent(parent);
            if(parent.nextPageDelegate() != null) {
                NextPageDelegate delegate = parent.nextPageDelegate();
                result = delegate.nextPage(parent);
View Full Code Here

        return result;
    }

    /** Utility to return the first enclosing component that matches the given class, if there is one. */
    public static WOComponent enclosingPageOfClass(WOComponent sender, Class c) {
        WOComponent p = sender.parent();
        while(p != null) {
            if(c.isAssignableFrom(p.getClass()))
                return p;
            p = p.parent();
        }
        return null;
    }
View Full Code Here

     * @param sender the sender component
     * @param c the class
     * @return sender or the first of sender's parents that is assignable from class c
     */
    public static <T> T enclosingComponentOfClass(WOComponent sender, Class<T> c) {
        WOComponent p = sender;
        while(p != null) {
            if(c.isAssignableFrom(p.getClass()))
                return (T)p;
            p = p.parent();
        }
        return null;
    }
View Full Code Here

        return null;
    }

    /** Utility to return the outermost page that is a D2W page. This is needed because this component might be embedded inside a plain page. */
    public static D2WPage topLevelD2WPage(WOComponent sender) {
        WOComponent p = sender.parent();
        WOComponent last = null;
        while(p != null) {
            if(p instanceof D2WPage) {
                last = p;
            }
            p = p.parent();
View Full Code Here

      AjaxToggleLink._appendAttributesToResponse(response, context, _toggleID, _effect, _duration);
    }
  }

  public static void _appendAttributesToResponse(WOResponse response, WOContext context, WOAssociation toggleIDAssociation, WOAssociation effectAssociation, WOAssociation durationAssociation) {
    WOComponent component = context.component();
    String effect = null;
    if (effectAssociation != null) {
      effect = (String) effectAssociation.valueInComponent(component);
    }
    if (effect == null) {
View Full Code Here

     * Creates the panes.
     */
    @Override
    public void appendToResponse(WOResponse aResponse, WOContext aContext)
    {
      WOComponent component = aContext.component();
      if (isVisble(component)) {
            aResponse.appendContentString("<li id=\"");
            aResponse.appendContentString(tabIdInComponent(component) + "_panel");
            aResponse.appendContentString("\" data-updateUrl=\"");
            aResponse.appendContentString(AjaxUtils.ajaxComponentActionUrl(aContext));
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WOComponent

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.