use of com.webobjects.appserver.WOElement in project wonder-slim by undur.
the class ERXWOComponentContent method invokeAction.
@Override
public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) {
WOComponent component = wocontext.component();
WOElement template = template(component);
WOActionResults result;
if (template != null) {
wocontext._setCurrentComponent(component.parent());
result = template.invokeAction(worequest, wocontext);
wocontext._setCurrentComponent(component);
} else {
result = _defaultTemplate.invokeAction(worequest, wocontext);
}
return result;
}
use of com.webobjects.appserver.WOElement 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.WOElement in project wonder-slim by undur.
the class WOHTMLWebObjectTag method dynamicElement.
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);
}
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;
}
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;
}
Aggregations