use of com.webobjects.appserver._private.WODeclaration in project wonder-slim by undur.
the class NotTagProcessor method createDeclaration.
@Override
public WODeclaration createDeclaration(String elementName, String elementType, NSMutableDictionary associations) {
String newElementType = "ERXWOConditional";
if (associations.objectForKey("negate") != null) {
throw new IllegalArgumentException("You already specified a binding for 'negate' of " + associations.objectForKey("negate") + " on a wo:not.");
}
associations.setObjectForKey(new WOConstantValueAssociation(Boolean.TRUE), "negate");
return super.createDeclaration(elementName, newElementType, associations);
}
use of com.webobjects.appserver._private.WODeclaration in project wonder-slim by undur.
the class NotTagProcessor method createDeclaration.
@Override
public WODeclaration createDeclaration(String elementName, String elementType, NSMutableDictionary associations) {
String newElementType = "ERXWOConditional";
if (associations.objectForKey("negate") != null) {
throw new IllegalArgumentException("You already specified a binding for 'negate' of " + associations.objectForKey("negate") + " on a wo:not.");
}
associations.setObjectForKey(new WOConstantValueAssociation(Boolean.TRUE), "negate");
return super.createDeclaration(elementName, newElementType, associations);
}
use of com.webobjects.appserver._private.WODeclaration in project wonder-slim by undur.
the class WOHTMLWebObjectTag method _elementWithDeclaration.
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.");
}
Class class1 = _NSUtilities.classWithName(s1);
if (class1 == null) {
if (NSLog.debugLoggingAllowedForLevelAndGroups(3, 8388608L)) {
NSLog.debug.appendln("<WOHTMLWebObjectTag> will look for com.webobjects.appserver._private." + s1 + " .");
}
class1 = WOBundle.lookForClassInAllBundles(s1);
if (class1 == null) {
NSLog.err.appendln("WOBundle.lookForClassInAllBundles(" + s1 + ") failed!");
} else if (!(com.webobjects.appserver.WODynamicElement.class).isAssignableFrom(class1)) {
class1 = null;
}
}
if (class1 != null) {
if (NSLog.debugLoggingAllowedForLevelAndGroups(3, 8388608L)) {
NSLog.debug.appendln("<WOHTMLWebObjectTag> Will initialize object of class " + s1);
}
if ((com.webobjects.appserver.WOComponent.class).isAssignableFrom(class1)) {
if (NSLog.debugLoggingAllowedForLevelAndGroups(3, 8388608L)) {
NSLog.debug.appendln("<WOHTMLWebObjectTag> will look for " + s1 + " in the Compiled Components.");
}
woelement1 = _componentReferenceWithClassNameDeclarationAndTemplate(s1, wodeclaration, woelement, nsarray);
} else {
woelement1 = _elementWithClass(class1, wodeclaration, woelement);
}
} else {
if (NSLog.debugLoggingAllowedForLevelAndGroups(3, 8388608L)) {
NSLog.debug.appendln("<WOHTMLWebObjectTag> will look for " + s1 + " in the Frameworks.");
}
woelement1 = _componentReferenceWithClassNameDeclarationAndTemplate(s1, wodeclaration, woelement, nsarray);
}
} else {
throw new WOHelperFunctionDeclarationFormatException("<WOHTMLWebObjectTag> declaration object for dynamic element (or component) named " + s + "has no class name.");
}
} else {
throw new WOHelperFunctionDeclarationFormatException("<WOHTMLTemplateParser> no declaration for dynamic element (or component) named " + s);
}
WOGenerationSupport.insertInElementsTableWithName(woelement1, s, wodeclaration.associations());
return woelement1;
}
use of com.webobjects.appserver._private.WODeclaration in project wonder-slim by undur.
the class WOHelperFunctionParser method didParseOpeningWebObjectTag.
public void didParseOpeningWebObjectTag(String s, WOHelperFunctionHTMLParser htmlParser) throws WOHelperFunctionHTMLFormatException {
if (WOHelperFunctionTagRegistry.allowInlineBindings()) {
int spaceIndex = s.indexOf(' ');
int colonIndex;
if (spaceIndex != -1) {
colonIndex = s.substring(0, spaceIndex).indexOf(':');
} else {
colonIndex = s.indexOf(':');
}
if (colonIndex != -1) {
WODeclaration declaration = parseInlineBindings(s, colonIndex);
s = "<wo name = \"" + declaration.name() + "\"";
}
}
_currentWebObjectTag = new WOHTMLWebObjectTag(s, _currentWebObjectTag);
log.debug("Inserted WebObject with Name '{}'.", _currentWebObjectTag.name());
}
use of com.webobjects.appserver._private.WODeclaration in project wonder-slim by undur.
the class WOHelperFunctionParser method processDeclaration.
protected void processDeclaration(WODeclaration declaration) {
NSMutableDictionary associations = (NSMutableDictionary) declaration.associations();
Enumeration bindingNameEnum = associations.keyEnumerator();
while (bindingNameEnum.hasMoreElements()) {
String bindingName = (String) bindingNameEnum.nextElement();
WOAssociation association = (WOAssociation) associations.valueForKey(bindingName);
WOAssociation helperAssociation = parserHelperAssociation(association);
if (helperAssociation != association) {
associations.setObjectForKey(helperAssociation, bindingName);
}
}
}
Aggregations