mapAttribute = tagInfoImpl.getDynamicAttributesName();
}
// fill all mentioned attributes
for (int i = 0; i < _attributeNames.size(); i++) {
QName attrName = _attributeNames.get(i);
Object value = _attributeValues.get(i);
TagAttributeInfo attribute = null;
int j = 0;
for (j = 0; attrs != null && j < attrs.length; j++) {
if (attrs[j].getName().equals(attrName.getName())) {
attribute = attrs[j];
break;
}
}
if (attribute == null && ! isDynamic)
throw error(L.l("unexpected attribute `{0}' in <{1}>",
attrName.getName(), getTagName()));
boolean rtexprvalue = true;
Class cl = null;
if (attribute != null) {
cl = _gen.loadBeanClass(attribute.getTypeName());
rtexprvalue = attribute.canBeRequestTime();
}
if (cl == null)
cl = String.class;
if (attribute == null) {
/*
if (mapName == null) {
mapName = "_jsp_map_" + _gen.uniqueId();
out.println("java.util.HashMap " + mapName + " = new java.util.HashMap(8);");
out.println(name + ".setAttribute(\"" + mapAttribute + "\", " + mapName + ");");
}
*/
out.print(customTagName + ".setDynamicAttribute(null, \"" + attrName.getName() + "\", ");
}
else
out.print(name + ".setAttribute(\"" + attrName.getName() + "\", ");
if (value instanceof JspNode) {
JspFragmentNode frag = (JspFragmentNode) value;
if (attribute != null &&
attribute.getTypeName().equals(JspFragment.class.getName())) {
out.println(generateFragment(frag, "pageContext") + ");");
}
else
out.println(frag.generateValue() + ");");
}
else {
String convValue = generateParameterValue(cl,
(String) value,
rtexprvalue,
attribute,
_parseState.isELIgnored());
// attribute.allowRtexpr());
out.println(toObject(cl, convValue) + ");");
String localName = attrName.getLocalName();
String upperName = Character.toUpperCase(localName.charAt(0)) + localName.substring(1);
if (attribute != null) {
// needed by TeamCity
out.println(customTagName + ".set" + upperName + "(" + convValue + ");");