results.append(getJavascriptBegin(methods));
for (Iterator i = actions.iterator(); i.hasNext();)
{
ValidatorAction va = (ValidatorAction)i.next();
int jscriptVar = 0;
String functionName = null;
if (va.getJsFunctionName() != null && va.getJsFunctionName().length() > 0)
{
functionName = va.getJsFunctionName();
}
else
{
functionName = va.getName();
}
results.append(" function ");
results.append(jsFormName);
results.append("_");
results.append(functionName);
results.append(" () { \n");
for (Iterator x = form.getFields().iterator(); x.hasNext();)
{
Field field = (Field)x.next();
// Skip indexed fields for now until there is
// a good way to handle error messages (and the length
// of the list (could retrieve from scope?))
if (field.isIndexed()
|| field.getPage() != page
|| !field.isDependency(va.getName()))
{
continue;
}
String message =