Search in sources :

Example 16 with WOElement

use of com.webobjects.appserver.WOElement in project wonder-slim by undur.

the class WOHTMLWebObjectTag method _elementWithClass.

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;
}
Also used : WOElement(com.webobjects.appserver.WOElement)

Example 17 with WOElement

use of com.webobjects.appserver.WOElement in project wonder-slim by undur.

the class WOHelperFunctionParser method parse.

public WOElement parse() throws WOHelperFunctionDeclarationFormatException, WOHelperFunctionHTMLFormatException, ClassNotFoundException {
    parseDeclarations();
    for (Enumeration e = declarations().objectEnumerator(); e.hasMoreElements(); ) {
        WODeclaration declaration = (WODeclaration) e.nextElement();
        processDeclaration(declaration);
    }
    WOElement woelement = parseHTML();
    return woelement;
}
Also used : Enumeration(java.util.Enumeration) WODeclaration(com.webobjects.appserver._private.WODeclaration) WOElement(com.webobjects.appserver.WOElement)

Example 18 with WOElement

use of com.webobjects.appserver.WOElement in project wonder-slim by undur.

the class WOHelperFunctionParser method parseHTML.

private WOElement parseHTML() throws WOHelperFunctionHTMLFormatException, WOHelperFunctionDeclarationFormatException, ClassNotFoundException {
    WOElement currentWebObjectTemplate = null;
    if (_HTMLString != null && _declarations != null) {
        WOHelperFunctionHTMLParser htmlParser = new WOHelperFunctionHTMLParser(this, _HTMLString);
        htmlParser.parseHTML();
        String webobjectTagName = _currentWebObjectTag.name();
        if (webobjectTagName != null) {
            throw new WOHelperFunctionHTMLFormatException("There is an unbalanced WebObjects tag named '" + webobjectTagName + "'.");
        }
        currentWebObjectTemplate = _currentWebObjectTag.template();
    }
    return currentWebObjectTemplate;
}
Also used : WOHTMLCommentString(com.webobjects.appserver._private.WOHTMLCommentString) WOElement(com.webobjects.appserver.WOElement)

Example 19 with WOElement

use of com.webobjects.appserver.WOElement in project wonder-slim by undur.

the class ERXWOSwitchComponent method _realComponentWithName.

public WOElement _realComponentWithName(String name, String elementID, WOContext paramWOContext) {
    WOElement localWOElement;
    synchronized (this) {
        localWOElement = (WOElement) componentCache.objectForKey(elementID);
        if (localWOElement == null) {
            localWOElement = WOApplication.application().dynamicElementWithName(name, componentAttributes, template, paramWOContext._languages());
            if (localWOElement == null) {
                throw new WODynamicElementCreationException("<" + getClass().getName() + "> : cannot find component or dynamic element named " + name);
            }
            componentCache.setObjectForKey(localWOElement, elementID);
        }
    }
    return localWOElement;
}
Also used : WODynamicElementCreationException(com.webobjects.appserver._private.WODynamicElementCreationException) WOElement(com.webobjects.appserver.WOElement)

Example 20 with WOElement

use of com.webobjects.appserver.WOElement in project wonder-slim by undur.

the class ERXWOSwitchComponent method invokeAction.

@Override
public WOActionResults invokeAction(WORequest paramWORequest, WOContext paramWOContext) {
    String name = componentNameInContext(paramWOContext.component());
    String id = _elementNameInContext(name, paramWOContext);
    paramWOContext.appendElementIDComponent(id);
    WOElement localWOElement = _realComponentWithName(name, id, paramWOContext);
    WOActionResults localWOActionResults = localWOElement.invokeAction(paramWORequest, paramWOContext);
    paramWOContext.deleteLastElementIDComponent();
    return localWOActionResults;
}
Also used : WOActionResults(com.webobjects.appserver.WOActionResults) WOElement(com.webobjects.appserver.WOElement)

Aggregations

WOElement (com.webobjects.appserver.WOElement)26 WOHTMLBareString (com.webobjects.appserver._private.WOHTMLBareString)8 Enumeration (java.util.Enumeration)6 WODeclaration (com.webobjects.appserver._private.WODeclaration)4 WODynamicGroup (com.webobjects.appserver._private.WODynamicGroup)4 WOComponent (com.webobjects.appserver.WOComponent)3 NSMutableArray (com.webobjects.foundation.NSMutableArray)3 WOActionResults (com.webobjects.appserver.WOActionResults)2 WOComponentReference (com.webobjects.appserver._private.WOComponentReference)2 WOHTMLCommentString (com.webobjects.appserver._private.WOHTMLCommentString)2 NSArray (com.webobjects.foundation.NSArray)2 WOResponse (com.webobjects.appserver.WOResponse)1 WOConstantValueAssociation (com.webobjects.appserver._private.WOConstantValueAssociation)1 WODynamicElementCreationException (com.webobjects.appserver._private.WODynamicElementCreationException)1 ERXWOTemplate (er.extensions.components.conditionals.ERXWOTemplate)1 Iterator (java.util.Iterator)1 List (java.util.List)1