use of com.webobjects.appserver._private.WOHTMLBareString 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.WOHTMLBareString 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.WOHTMLBareString in project wonder-slim by undur.
the class ERXWOSwitch method childCaseInContext.
protected WOElement childCaseInContext(WOContext context) {
Object value = _case.valueInComponent(context.component());
value = (value == null ? "default" : value);
WOElement result = _childCases.objectForKey(value);
if (result == null) {
result = _childCases.objectForKey("default");
}
if (result == null) {
result = new WOHTMLBareString("");
}
return result;
}
Aggregations