Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOComponent


  @Override
  public void appendToResponse(WOResponse response, WOContext context) {
    AjaxUtils.addScriptResourceInHead(context, response, "prototype.js");
    AjaxUtils.addScriptResourceInHead(context, response, "effects.js");
    AjaxUtils.addScriptResourceInHead(context, response, "wonder.js");
    WOComponent component = context.component();
    boolean generateContainer = (_id == null || _elementName != null);
    String elementName;
    if (_elementName == null) {
      elementName = "div";
    }
View Full Code Here


       */
      private static final long serialVersionUID = 1L;

        public static NextPageDelegate instance=new _D2WPickActionDelegate ();
        public WOComponent nextPage(WOComponent sender) {
            WOComponent target = D2WEmbeddedComponent.findTarget(sender);
            WOComponent nextPage = null;
            if (target.hasBinding("branchDelegate")) {
                ERDBranchDelegate delegate = (ERDBranchDelegate)target.valueForBinding("branchDelegate");
                if (delegate == null) {
                    throw new RuntimeException("Null branch delegate. Sender: " + sender + " Target: " + target);
                } else {
View Full Code Here

  }

  @Override
  public void appendToResponse(WOResponse response, WOContext context) {
    super.appendToResponse(response, context);
    WOComponent component = context.component();
    String className = (String) _classAssociation.valueInComponent(component);
    String elementName = (String) _elementNameAssociation.valueInComponent(component);
    boolean generateTags = ((Boolean) _generateTagsAssociation.valueInComponent(component)).booleanValue();
    if (generateTags) {
      elementName = "div";
View Full Code Here

  }

  @Override
  public void appendToResponse(WOResponse response, WOContext context) {

    WOComponent component = context.component();
    String sliderID = (String)valueForBinding("id", ERXWOContext.safeIdentifierName(context, true) + "Slider", component);
    String elementID = (String)valueForBinding("element", ERXWOContext.safeIdentifierName(context, true) + "Element", component);
    String knobID = (String)valueForBinding("knob", ERXWOContext.safeIdentifierName(context, true) + "Knob", component);
    response.appendContentString("\n<div");
    appendTagAttributeToResponse(response, "id", elementID);
View Full Code Here

    public void setShowResults(boolean value) {
        showResults = value;
    }

    public WOComponent queryAction() {
        WOComponent nextPage = null;

        // If we have a validation delegate, validate the query values before actually performing the query.
        ERDQueryValidationDelegate queryValidationDelegate = queryValidationDelegate();
        if (queryValidationDelegate != null) {
            clearValidationFailed();
View Full Code Here

    // returning a null query data source if cancel was clicked
    private boolean _wasCancelled;
   
    public WOComponent cancelAction() {
        WOComponent result = null;
        try {
            _wasCancelled = true;
            result = nextPageFromDelegate();
            if (result == null) {
                // CHECKME AK: or return null?? no way of knowing...
View Full Code Here

      try {
        EOEditingContext ec = ERXEC.newEditingContext();
        ec.lock();
        try {
          log.info("Creating page: " + pageName);
          WOComponent page = D2W.factory().pageForConfigurationNamed(pageName, session);
          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) {
            SelectPageInterface lpi = (SelectPageInterface) page;
            lpi.setDataSource(ERXEOControlUtilities.dataSourceForArray(ec, entityName, new NSArray(EOUtilities.createAndInsertInstance(ec, entityName))));
          } else if (page instanceof ConfirmPageInterface) {
            ConfirmPageInterface cpi = (ConfirmPageInterface) page;
            // nothing
          } else if (page instanceof QueryPageInterface) {
            QueryPageInterface qpi = (QueryPageInterface) page;
            // nothing
          } else {
            log.info("Unsupported: " + pageName + " -> " + page.name());
          }
          page.appendToResponse(new ERXResponse(), context);
        } finally {
          ec.unlock();
        }
      } catch(Throwable t) {
        log.error("Error running: " + pageName + ":" +  t.getMessage() + " Tree: " + ERXWOContext.componentPath(context));
View Full Code Here

        buffer.append(aUrl);
        return buffer.toString();
    }

    public WOComponent invokeAction()  {
        WOComponent aComponent = null;
        if (hasBinding("pageName")) {
            String aPageName = (String)_WOJExtensionsUtil.valueForBindingOrNull("pageName",this);
            aComponent = pageWithName(aPageName);
        } else {
            aComponent = (WOComponent)_WOJExtensionsUtil.valueForBindingOrNull("action",this);
View Full Code Here

  @SuppressWarnings("rawtypes")
  public void appendToResponse(WOResponse response, WOContext context) {

    super.appendToResponse(response, context);
   
    WOComponent component = context.component();
    String observeFieldID = (String) valueForBinding("observeFieldID", component);
    String updateContainerID = MTAjaxUpdateContainer.updateContainerID(this, component);    
    NSMutableDictionary options = createAjaxOptions(component);
    boolean fullSubmit = booleanValueForBinding("fullSubmit", false, component);
    boolean observeFieldDescendents;
View Full Code Here

    MTAjaxObserveField.appendToResponse(response, context, this, observeFieldID, observeFieldDescendents, updateContainerID, fullSubmit, options);
    AjaxUtils.appendScriptFooter(response);
  }

  public static void appendToResponse(WOResponse response, WOContext context, AjaxDynamicElement element, String observeFieldID, boolean observeDescendentFields, String updateContainerID, boolean fullSubmit, NSMutableDictionary options) {
    WOComponent component = context.component();
    String submitButtonName = nameInContext(context, component, element);
    NSMutableDictionary observerOptions = new NSMutableDictionary();
    if (options != null) {
      observerOptions.addEntriesFromDictionary(options);
    }
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.