use of com.webobjects.appserver._private.WOComponentReference in project wonder-slim by undur.
the class WOHTMLWebObjectTag method _componentReferenceWithClassNameDeclarationAndTemplate.
private static WOElement _componentReferenceWithClassNameDeclarationAndTemplate(String s, WODeclaration wodeclaration, WOElement woelement, NSArray nsarray) throws ClassNotFoundException {
WOComponentReference wocomponentreference = null;
WOComponentDefinition wocomponentdefinition = WOApplication.application()._componentDefinition(s, nsarray);
if (wocomponentdefinition != null) {
NSDictionary nsdictionary = wodeclaration.associations();
wocomponentreference = wocomponentdefinition.componentReferenceWithAssociations(nsdictionary, woelement);
} else {
throw new ClassNotFoundException("Cannot find class or component named \'" + s + "\" in runtime or in a loadable bundle");
}
return wocomponentreference;
}
use of com.webobjects.appserver._private.WOComponentReference in project wonder-slim by undur.
the class WOHTMLWebObjectTag method template.
public WOElement template() {
NSMutableArray nsmutablearray = null;
if (_children == null) {
return null;
}
Enumeration enumeration = _children.objectEnumerator();
if (enumeration != null) {
nsmutablearray = new NSMutableArray(_children.count());
StringBuilder stringbuffer = new StringBuilder(128);
while (enumeration.hasMoreElements()) {
Object obj1 = enumeration.nextElement();
if (obj1 instanceof String) {
stringbuffer.append((String) obj1);
} else {
if (stringbuffer.length() > 0) {
WOHTMLBareString wohtmlbarestring1 = new WOHTMLBareString(stringbuffer.toString());
nsmutablearray.addObject(wohtmlbarestring1);
stringbuffer.setLength(0);
}
nsmutablearray.addObject(obj1);
}
}
if (stringbuffer.length() > 0) {
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);
} else {
obj = (WOElement) obj2;
}
} else {
obj = new WODynamicGroup(_name, null, nsmutablearray);
}
return obj;
}
use of com.webobjects.appserver._private.WOComponentReference in project wonder-slim by undur.
the class WOHTMLWebObjectTag method template.
public WOElement template() {
NSMutableArray nsmutablearray = null;
if (_children == null) {
return null;
}
Enumeration enumeration = _children.objectEnumerator();
if (enumeration != null) {
nsmutablearray = new NSMutableArray(_children.count());
StringBuilder stringbuffer = new StringBuilder(128);
while (enumeration.hasMoreElements()) {
Object obj1 = enumeration.nextElement();
if (obj1 instanceof String) {
stringbuffer.append((String) obj1);
} else {
if (stringbuffer.length() > 0) {
WOHTMLBareString wohtmlbarestring1 = new WOHTMLBareString(stringbuffer.toString());
nsmutablearray.addObject(wohtmlbarestring1);
stringbuffer.setLength(0);
}
nsmutablearray.addObject(obj1);
}
}
if (stringbuffer.length() > 0) {
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);
} else {
obj = (WOElement) obj2;
}
} else {
obj = new WODynamicGroup(_name, null, nsmutablearray);
}
return obj;
}
use of com.webobjects.appserver._private.WOComponentReference in project wonder-slim by undur.
the class WOHTMLWebObjectTag method _componentReferenceWithClassNameDeclarationAndTemplate.
private static WOElement _componentReferenceWithClassNameDeclarationAndTemplate(String s, WODeclaration wodeclaration, WOElement woelement, NSArray nsarray) throws ClassNotFoundException {
WOComponentReference wocomponentreference = null;
WOComponentDefinition wocomponentdefinition = WOApplication.application()._componentDefinition(s, nsarray);
if (wocomponentdefinition != null) {
NSDictionary nsdictionary = wodeclaration.associations();
wocomponentreference = wocomponentdefinition.componentReferenceWithAssociations(nsdictionary, woelement);
} else {
throw new ClassNotFoundException("Cannot find class or component named \'" + s + "\" in runtime or in a loadable bundle");
}
return wocomponentreference;
}
Aggregations