Search in sources :

Example 21 with WODeclaration

use of com.webobjects.appserver._private.WODeclaration 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 22 with WODeclaration

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

the class WOHelperFunctionParser method createDeclaration.

public static WODeclaration createDeclaration(String declarationName, String declarationType, NSMutableDictionary associations) {
    WODeclaration declaration = new WODeclaration(declarationName, declarationType, associations);
    if (WOHelperFunctionParser._debugSupport && associations != null && associations.objectForKey(WOHTMLAttribute.Debug) == null) {
        // associations.setObjectForKey(new WOConstantValueAssociation(Boolean.TRUE), WOHTMLAttribute.Debug);
        Enumeration associationsEnum = associations.keyEnumerator();
        while (associationsEnum.hasMoreElements()) {
            String bindingName = (String) associationsEnum.nextElement();
            WOAssociation association = (WOAssociation) associations.objectForKey(bindingName);
            association.setDebugEnabledForBinding(bindingName, declarationName, declarationType);
            association._setDebuggingEnabled(false);
        }
    }
    return declaration;
}
Also used : WOAssociation(com.webobjects.appserver.WOAssociation) Enumeration(java.util.Enumeration) WODeclaration(com.webobjects.appserver._private.WODeclaration) WOHTMLCommentString(com.webobjects.appserver._private.WOHTMLCommentString)

Aggregations

WODeclaration (com.webobjects.appserver._private.WODeclaration)12 Enumeration (java.util.Enumeration)10 WOHTMLCommentString (com.webobjects.appserver._private.WOHTMLCommentString)8 WOElement (com.webobjects.appserver.WOElement)6 NSMutableDictionary (com.webobjects.foundation.NSMutableDictionary)6 WOAssociation (com.webobjects.appserver.WOAssociation)4 WOConstantValueAssociation (com.webobjects.appserver._private.WOConstantValueAssociation)4 WOHTMLBareString (com.webobjects.appserver._private.WOHTMLBareString)4 WOComponentDefinition (com.webobjects.appserver._private.WOComponentDefinition)2 WOComponentReference (com.webobjects.appserver._private.WOComponentReference)2 WOKeyValueAssociation (com.webobjects.appserver._private.WOKeyValueAssociation)2 NSDictionary (com.webobjects.foundation.NSDictionary)2