* @param field the validator field
*/
public static String[] getArgs(String actionName, MessageResources messages,
Locale locale, Field field) {
Arg arg0 = field.getArg0(actionName);
Arg arg1 = field.getArg1(actionName);
Arg arg2 = field.getArg2(actionName);
Arg arg3 = field.getArg3(actionName);
String sArg0 = null;
String sArg1 = null;
String sArg2 = null;
String sArg3 = null;
if (arg0 != null) {
if (arg0.getResource()) {
sArg0 = getMessage(messages, locale, arg0.getKey());
} else {
sArg0 = arg0.getKey();
}
}
if (arg1 != null) {
if (arg1.getResource()) {
sArg1 = getMessage(messages, locale, arg1.getKey());
} else {
sArg1 = arg1.getKey();
}
}
if (arg2 != null) {
if (arg2.getResource()) {
sArg2 = getMessage(messages, locale, arg2.getKey());
} else {
sArg2 = arg2.getKey();
}
}
if (arg3 != null) {
if (arg3.getResource()) {
sArg3 = getMessage(messages, locale, arg3.getKey());
} else {
sArg3 = arg3.getKey();
}
}
return new String[] { sArg0, sArg1, sArg2, sArg3 };