I already got it working... with the following code:
/...
//Textfields or Form Components GO HERE...
@Override
public void onValidateModelObjects() {
ValidationProcess vp = new ValidationProcess();
vp.validate("Rules.js", r);
msg = "";
if (vp.getConstraintViolations().size() > 0) {
for (String s : vp.getConstraintViolations()) {
if (s.contains(";")) {
String[] splitted = s.split(";");
String elementname = splitted[0];
String errorMessage = splitted[1];
if (elementname.equals("price")) {
//SET Error of Component, will be automatically
display by FeedbackPanel...
price.error(elementname + " " + errorMessage +
". ");
} else if (elementname.equals("recipient")) {
recipient.error(elementname + " " +
errorMessage);
}
}
}
}
}
//Rest of the Code/
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Handle-feedback-Messages-with-a-custom-validation-framework-tp4653599p4653605.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]