Hi, are you looking for a generic way to highlight invalid components? If so, have a look at https://code.google.com/p/londonwicket/downloads/detail?name=LondonWicket-FormsWithFlair.pdf
as an inspiration point. Depending on the wicket version, you might have to adopt the code a bit. Hope that helps On Sun, Oct 14, 2012 at 12:37 PM, delta458 <delta...@hotmail.com> wrote: > Hello, > > How can I highlight my form fields when I use a custom validation framework. > The validation process itself is already working. I am using Oval Validation > Framework as my custom validation framework. > > Code of JAVA File: > ... > public InvoiceForm() { > setPageTitle("Invoice"); > > > CompoundPropertyModel<Invoice> formModel = new > CompoundPropertyModel<Invoice>(new Rechnung()); > Form<Invoice> form = new Form("inputForm", formModel) { > @Override > public void onSubmit() { > System.out.println("Working." + > getDefaultModelObjectAsString()); > } > > * //Custom Validation starts here. Using Oval Validation > Framework* > @Override > public void onValidateModelObjects() { > *Validator val = new Validator(); > List<ConstraintViolation> violations = > val.validate(getDefaultModelObject()); > * > if (violations.size() > 0) { > System.out.println("Object " + > getDefaultModelObjectAsString() + " is invalid."); > } > } > }; > > form.add(new TextField<String>("Empfänger")); > form.add(new TextField<String>("Details")); > ... > > > > > Code of HTML File: > > > It would be great if you give me a short example on how to do that. Or links > with good tutorials? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/highlight-invalid-fields-with-custom-Validation-Framework-tp4652949.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org