Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOElement


    public ERXWOSwitch(String name, NSDictionary<String, WOAssociation> associations, WOElement template) {
        super(name, associations, template);
        NSMutableDictionary<Object, WOElement> dict = new NSMutableDictionary<Object, WOElement>();
        _case = associations.objectForKey("case");
        for(Enumeration e = ((WODynamicGroup)template).childrenElements().objectEnumerator(); e.hasMoreElements(); ) {
            WOElement child = (WOElement)e.nextElement();
            if(child instanceof ERXWOCase) {
                Object value = ((ERXWOCase)child).caseValue();
                dict.setObjectForKey(child, value);
            } else if(!(child instanceof WOHTMLBareString)) {
                throw new IllegalStateException("Direct children must be ERXWOCase");
View Full Code Here


    protected WOElement childCaseInContext(WOContext context) {
        Object value = _case.valueInComponent(context.component());
        value = (value == null ? "default" : value);

        WOElement result = _childCases.objectForKey(value);

        if(result == null) {
            result = _childCases.objectForKey("default");
        }
        if(result == null) {
View Full Code Here

        }
        return "ERROR_URL_NOT_FOUND";
    }

    public WOElement frameContent()  {
        WOElement aContentElement = null;
        if (hasBinding("pageName")) {
            String  aPageName = (String)_WOJExtensionsUtil.valueForBindingOrNull("pageName",this);
            aContentElement = pageWithName(aPageName);
        } else if(hasBinding("value")) {
            aContentElement = (WOElement)_WOJExtensionsUtil.valueForBindingOrNull("value",this);
View Full Code Here

        WOHTMLBareString wohtmlbarestring = new WOHTMLBareString(stringbuffer.toString());
        stringbuffer.setLength(0);
        nsmutablearray.addObject(wohtmlbarestring);
      }
    }
    WOElement obj = null;
    if (nsmutablearray != null && nsmutablearray.count() == 1) {
      Object obj2 = nsmutablearray.objectAtIndex(0);
      if (obj2 instanceof WOComponentReference) {
        obj = new WODynamicGroup(_name, null, (WOElement) obj2);
      }
View Full Code Here

    _children.addObject(obj);
  }

  public WOElement dynamicElement(NSDictionary nsdictionary, NSArray nsarray) throws WOHelperFunctionDeclarationFormatException, ClassNotFoundException {
    String s = name();
    WOElement woelement = template();
    WODeclaration wodeclaration = (WODeclaration) nsdictionary.objectForKey(s);
    return _elementWithDeclaration(wodeclaration, s, woelement, nsarray);
  }
View Full Code Here

    }
    return wocomponentreference;
  }

  private static WOElement _elementWithClass(Class class1, WODeclaration wodeclaration, WOElement woelement) {
    WOElement woelement1 = WOApplication.application().dynamicElementWithName(class1.getName(), wodeclaration.associations(), woelement, null);
    if (NSLog.debugLoggingAllowedForLevelAndGroups(3, 8388608L)) {
      NSLog.debug.appendln("<WOHTMLWebObjectTag> Created Dynamic Element with name :" + class1.getName());
      NSLog.debug.appendln("Declaration : " + wodeclaration);
      NSLog.debug.appendln("Element : " + woelement1.toString());
    }
    return woelement1;
  }
View Full Code Here

    }
    return woelement1;
  }

  private static WOElement _elementWithDeclaration(WODeclaration wodeclaration, String s, WOElement woelement, NSArray nsarray) throws ClassNotFoundException, WOHelperFunctionDeclarationFormatException {
    WOElement woelement1 = null;
    if (wodeclaration != null) {
      String s1 = wodeclaration.type();
      if (s1 != null) {
        if (NSLog.debugLoggingAllowedForLevelAndGroups(3, 8388608L)) {
          NSLog.debug.appendln("<WOHTMLWebObjectTag> will look for " + s1 + " in the java runtime.");
View Full Code Here

    private void findTabs(WODynamicGroup template)  {
      if (template == null || template.childrenElements() == null) return;

        NSArray children = template.childrenElements();
        for (int i = 0; i < children.count(); i++) {
            WOElement child = (WOElement)children.objectAtIndex(i);
            if (child instanceof AjaxTabbedPanelTab) {
              AjaxTabbedPanelTab childTab = (AjaxTabbedPanelTab)child;

              // The tabs need to have an id attribute so we assign one if needed
                if (childTab.id() == null) {
View Full Code Here

        response.appendContentString("<ul>");
       
        int maxItems = maxItems();
        int itemsCount = 0;
        Object values = valueForBinding("list");
        WOElement child = _childTemplate();
        boolean hasItem = hasBinding("item");
        if (values instanceof NSArray) {
          for(Enumeration valueEnum = ((NSArray)values).objectEnumerator(); valueEnum.hasMoreElements() && itemsCount++ < maxItems;) {
            appendItemToResponse(valueEnum.nextElement(), child, hasItem, response, context);
          }
View Full Code Here

    private void findTabs(WODynamicGroup template)  {
      if (template == null || template.childrenElements() == null) return;

        NSArray<WOElement> children = template.childrenElements();
        for (int i = 0; i < children.count(); i++) {
            WOElement child = children.objectAtIndex(i);
            if (child instanceof MTAjaxTabbedPanelTab) {
              MTAjaxTabbedPanelTab childTab = (MTAjaxTabbedPanelTab)child;

              // The tabs need to have an id attribute so we assign one if needed
                if (childTab.id() == null) {
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WOElement

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.