Use the ComponentFeedbackPanel, ccFeedback = new ComponentFeedbackPanel("ccNumberError",ccNumber); ccFeedback.setOutputMarkupId(true); addOrReplace(ccFeedback);then you can do this: <input wicket:id="ccNumber" value="" class="" type="text" /> <span wicket:id="ccNumberError"></span> From: rinoc...@live.se To: users@wicket.apache.org Subject: Validation component feedback in table column Date: Fri, 17 Jul 2009 10:34:19 +0200
I have been experimenting with this for while more, but I can't seem to get it to work as I want. I have attached a small quickstart. I have a table with an input field on each row, where I want to validate that the entered input value should not be allowed to be more than the displayed value, in that case, a message should be displayed next to the field, in the table. I have added an onblur event to the input field and also a validator. If I enter a value above the limit and tab out of the field, the validation message is displayed next to the field. If I instead enter a errornous value an click the submit button, the error message(s) is displayed in the form feeback and not next to the field. How do I get the validation error to be displayed next to the field? I have been reading alot of examples, javadoc and source now and can't get it to work the wy I want. I wonder how I change my code to get it to work? /Kenneth > Date: Sat, 11 Jul 2009 22:09:32 -0500 > Subject: Re: Validation and component feedback for editable column component > in table/list > From: jer...@wickettraining.com > To: users@wicket.apache.org > > Seems like you might be missing the part where you have to add a > feedback panel to display the error messages in a form. Since you > mention that your previous application showed the message near the > field, this page might help you: > > http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > Gör personlighetstestet på MSN Dejting, se vem du passar ihop med! MSN Dejting _________________________________________________________________ Windows Live™ SkyDrive™: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009