Try

form.error(getString("error.SolrConnectionFault"));

-----Original Message-----
From: Riccardo Trombini [mailto:riccardo.tromb...@csnc.ch]
Sent: Thursday, January 21, 2010 5:09 PM
To: users@wicket.apache.org
Subject: Validation errors

Hi



I have problems with FormValidation. Everything works perfect till
Wicket has to promt the Errormessages.

Something with the localization went wrong, instead of the message I
receive : "[ValidationError message=[null],
keys=[error.SolrConnectionFault], variables=[null]]"



I use a FeedbackPanel which is added to a form.



final FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");

feedbackPanel.setOutputMarkupId(true);

searchForm.add(feedbackPanel);



AjaxButton searchbutton = new AjaxButton("searchbutton", new
PropertyModel(dataContainer, "visible")) {



            protected void onError(AjaxRequestTarget target, Form<?>
arg1) {

                  target.addComponent(feedbackPanel);

            }



            @Override

            protected void onSubmit(AjaxRequestTarget target, Form<?>
form) {

                  ...

                  form.error(new
ValidationError().addMessageKey("error.SolrConnectionFault"));

                  ....

            }

};


The information contained in this communication is confidential, intended 
solely for the use of the individual or entity to whom it is addressed and may 
be legally privileged and protected by professional secrecy. Access to this 
message by anyone else is unauthorized. If you are not the intended recipient, 
any disclosure, copying, or distribution of the message, or any action or 
omission taken by you in reliance on it is prohibited and may be unlawful. 
Please immediately contact the sender if you have received this message in 
error. This email does not constitute any commitment from Cordys Holding BV or 
any of its subsidiaries except when expressly agreed in a written agreement 
between the intended recipient and Cordys Holding BV or its subsidiaries. 
Cordys is neither liable for the proper and complete transmission of the 
information contained in this communication nor for any delay in its receipt. 
Cordys does not guarantee that the integrity of this communication has been 
maintained nor that the communication is free of viruses, interceptions or 
interference. If you are not the intended recipient of this communication 
please return the communication to the sender and delete and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to