}
public void translate(HTMLSessionVariable sessionVariable, HTMLParser parser)
throws Exception {
String childName = getFieldName();
DataModel child = parser.getModel().getChild(childName);
if (!(child instanceof ArrayModel)) {
if (childName == null) {
throw new Exception(parser.getModel().getFieldName() + " is not an ArrayModel");
}
throw new Exception("Child " + childName + " of " + parser.getModel().getFieldName() + " is not an ArrayModel");
}
ArrayModel array = (ArrayModel) child;
DataModelEnumeration e = array.getEnumeration();
VariableStore variableStore = parser.getResolver().getVariableStore();
int index = 0;
String oldIndex = variableStore.getValueOf(VariableStore.INDEX);
String oldCount = variableStore.getValueOf(VariableStore.COUNT);
String template = getTemplate();
boolean childIsEditor = parser.isEditor();
Boolean type = getIsEditor();
if (type != null) {
childIsEditor = type.booleanValue();
}
variableStore.setVariable(VariableStore.COUNT, Integer.toString(array.getSize()));
while (e.hasMore()) {
DataModel item = e.next();
variableStore.setVariable(VariableStore.INDEX, Integer.toString(index + 1));
byte result[] = parser.getResolver().resolve(sessionVariable, item, template, childIsEditor);