// ### probably compiling this to 2 arrays might be quicker and smaller
for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) {
Map.Entry entry = (Map.Entry) iter.next();
String name = (String) entry.getKey();
Expression expression = (Expression) entry.getValue();
Object value = expression.evaluate(context);
dynaTag.setAttribute(name, value);
}
}
else {
// treat the tag as a bean
DynaBean dynaBean = new ConvertingWrapDynaBean( tag );
for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) {
Map.Entry entry = (Map.Entry) iter.next();
String name = (String) entry.getKey();
Expression expression = (Expression) entry.getValue();
Object value = expression.evaluate(context);
dynaBean.set(name, value);
}
}
tag.doTag(output);