<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Integration of JSR 303 bean validation standard and Wicket 1.4</title>
	<atom:link href="http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/</link>
	<description>Carlos Vara&#039;s writings about software development</description>
	<lastBuildDate>Sat, 17 Mar 2012 14:17:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Maxat</title>
		<link>http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/comment-page-1/#comment-743</link>
		<dc:creator>Maxat</dc:creator>
		<pubDate>Thu, 23 Sep 2010 09:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=135#comment-743</guid>
		<description>Now I have a nice picture of bean validation. Thanks. I will try it with Hibernate validator.</description>
		<content:encoded><![CDATA[<p>Now I have a nice picture of bean validation. Thanks. I will try it with Hibernate validator.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ste</title>
		<link>http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/comment-page-1/#comment-637</link>
		<dc:creator>Ste</dc:creator>
		<pubDate>Thu, 02 Sep 2010 20:06:41 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=135#comment-637</guid>
		<description>Good work. But I have to agree with Joe. The Form Model will not be updated before all Components and the Form itself is valid. Also validation of the components will not update the Model. It only will work if you use the InputValidationBorder, because that adds a AjaxUpdatingBehavior. This updating behavior causes a update of the Model.

My Problem: I have a Formular that should be validated without AjaxUpdatingBehavior. Does anyone know how to handle that?

Thank you for your answers.

Kind Regards</description>
		<content:encoded><![CDATA[<p>Good work. But I have to agree with Joe. The Form Model will not be updated before all Components and the Form itself is valid. Also validation of the components will not update the Model. It only will work if you use the InputValidationBorder, because that adds a AjaxUpdatingBehavior. This updating behavior causes a update of the Model.</p>
<p>My Problem: I have a Formular that should be validated without AjaxUpdatingBehavior. Does anyone know how to handle that?</p>
<p>Thank you for your answers.</p>
<p>Kind Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/comment-page-1/#comment-169</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 07 Apr 2010 12:41:38 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=135#comment-169</guid>
		<description>I got it working! Carlos, thanks!!!

This line in UserRegistrationPanel.java

add(new Jsr303FormValidator(usernameInput, passwordInput, passwordVerificationInput, ageInput));

Should be:

add(new Jsr303FormValidator(emailInput, passwordInput, passwordVerificationInput, ageInput));</description>
		<content:encoded><![CDATA[<p>I got it working! Carlos, thanks!!!</p>
<p>This line in UserRegistrationPanel.java</p>
<p>add(new Jsr303FormValidator(usernameInput, passwordInput, passwordVerificationInput, ageInput));</p>
<p>Should be:</p>
<p>add(new Jsr303FormValidator(emailInput, passwordInput, passwordVerificationInput, ageInput));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Vara</title>
		<link>http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/comment-page-1/#comment-31</link>
		<dc:creator>Carlos Vara</dc:creator>
		<pubDate>Sun, 17 Jan 2010 23:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=135#comment-31</guid>
		<description>Hi Joe,

I have checked in my application and the validator receives a non-null NewUser with all the four fields set (of course, this only happens when the individual fields, whose input components are parameters of the form&#039;s validator constructor, are all valid). 

You are right that in Wicket&#039;s form processing, the model is set after validation is performed. But also, input validation is done prior to form validation, so if the inputs are determined to be valid, their model objects are set. As their model is a property model, they populate the NewUser&#039;s object that the form validator checks.

So, make sure that:
- Your form&#039;s model works the same in this respect as the one I use: CompoundPropertyModel&lt;NewUser&gt;(new NewUser())
- That you specify all the needed input&#039;s in your form validator, so it is only called when if all those fields are valid.

Tell me if this fixed it :-)</description>
		<content:encoded><![CDATA[<p>Hi Joe,</p>
<p>I have checked in my application and the validator receives a non-null NewUser with all the four fields set (of course, this only happens when the individual fields, whose input components are parameters of the form&#8217;s validator constructor, are all valid). </p>
<p>You are right that in Wicket&#8217;s form processing, the model is set after validation is performed. But also, input validation is done prior to form validation, so if the inputs are determined to be valid, their model objects are set. As their model is a property model, they populate the NewUser&#8217;s object that the form validator checks.</p>
<p>So, make sure that:<br />
- Your form&#8217;s model works the same in this respect as the one I use: CompoundPropertyModel<newuser>(new NewUser())<br />
- That you specify all the needed input&#8217;s in your form validator, so it is only called when if all those fields are valid.</p>
<p>Tell me if this fixed it <img src='http://carinae.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </newuser></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/comment-page-1/#comment-30</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Sun, 17 Jan 2010 12:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=135#comment-30</guid>
		<description>It&#039;s a very useful post. I&#039;m testing wicket+JEE 6 and I had to change just a few class names to work.
Only 1 thing is not working: you use form.getModelObject() in the validate method of Jsr303FormValidator. I noticed that model is not set before validation so every time I get an empty user object (password and passwordVerification properties are null in it). I checked the source of Wicket Form (1.4.5) and beforeUpdateFormComponentModels() and updateFormComponentModels() are called after form validation (only if it is valid).

Is it working in your application?</description>
		<content:encoded><![CDATA[<p>It&#8217;s a very useful post. I&#8217;m testing wicket+JEE 6 and I had to change just a few class names to work.<br />
Only 1 thing is not working: you use form.getModelObject() in the validate method of Jsr303FormValidator. I noticed that model is not set before validation so every time I get an empty user object (password and passwordVerification properties are null in it). I checked the source of Wicket Form (1.4.5) and beforeUpdateFormComponentModels() and updateFormComponentModels() are called after form validation (only if it is valid).</p>
<p>Is it working in your application?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Szulc</title>
		<link>http://carinae.net/2009/12/integration-of-jsr-303-bean-validation-standard-and-wicket-1-4/comment-page-1/#comment-26</link>
		<dc:creator>Paul Szulc</dc:creator>
		<pubDate>Tue, 05 Jan 2010 08:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://carinae.net/?p=135#comment-26</guid>
		<description>Very nice post. You did great investigation and shared it with community. I love the idea, will check how it works pretty soon.</description>
		<content:encoded><![CDATA[<p>Very nice post. You did great investigation and shared it with community. I love the idea, will check how it works pretty soon.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

