<?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: Spring Forms, Dynamic Lists and Ajax</title>
	<atom:link href="http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/</link>
	<description>Eggsylife</description>
	<lastBuildDate>Tue, 07 Sep 2010 16:27:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ahsan Javed</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-125</link>
		<dc:creator>Ahsan Javed</dc:creator>
		<pubDate>Tue, 07 Sep 2010 16:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-125</guid>
		<description>Hi,
Very nice and explanatory tutorial indeed. I however need adding a child field via a pop up window. I am able to open the pop up window but when I try to add the newly generated field row to my table, it fails to bind with spring. I am adding a new TR element to table body via jQuery and not via jsp as shown in your example. 

Can you please show me how to add rows to table via jQuery which later on are bound with spring.

Thanks
Ahsan</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Very nice and explanatory tutorial indeed. I however need adding a child field via a pop up window. I am able to open the pop up window but when I try to add the newly generated field row to my table, it fails to bind with spring. I am adding a new TR element to table body via jQuery and not via jsp as shown in your example. </p>
<p>Can you please show me how to add rows to table via jQuery which later on are bound with spring.</p>
<p>Thanks<br />
Ahsan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-107</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 29 Apr 2010 18:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-107</guid>
		<description>Hi there,

Many thanks for your comments I am glad it helped  you :)</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>Many thanks for your comments I am glad it helped  you <img src='http://eggsylife.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-106</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Thu, 29 Apr 2010 14:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-106</guid>
		<description>This is a tremendous help.  It solves a problem that I have encountered with a new project.  I just want to say thank you for such a thorough post -- it will be a big time saver for me.

Cheers!</description>
		<content:encoded><![CDATA[<p>This is a tremendous help.  It solves a problem that I have encountered with a new project.  I just want to say thank you for such a thorough post &#8212; it will be a big time saver for me.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-102</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 22 Apr 2010 11:34:08 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-102</guid>
		<description>Hi there,

I guess in the controller submit method you could add the BindingResult parameter and implement your own validator.

You could also use the new JSR-303 Bean Annotation validation on each individual student and that should vailidate so the onSubmit method would become:

&lt;pre lang=&quot;JAVA&quot;&gt;
@RequestMapping(method = RequestMethod.POST, value=&quot;/processClassForm.page&quot;)
protected String onSubmit( @ModelAttribute(&quot;classCommand&quot;) @Valid ClassCommand classCommand,  ModelMap model )
{
	model.addAttribute(&quot;savedClass&quot;, classCommand);
	return &quot;formResult.view&quot;;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I guess in the controller submit method you could add the BindingResult parameter and implement your own validator.</p>
<p>You could also use the new JSR-303 Bean Annotation validation on each individual student and that should vailidate so the onSubmit method would become:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@RequestMapping<span style="color: #009900;">&#40;</span>method <span style="color: #339933;">=</span> RequestMethod.<span style="color: #006633;">POST</span>, value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;/processClassForm.page&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #003399;">String</span> onSubmit<span style="color: #009900;">&#40;</span> @ModelAttribute<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;classCommand&quot;</span><span style="color: #009900;">&#41;</span> @Valid ClassCommand classCommand,  ModelMap model <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	model.<span style="color: #006633;">addAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;savedClass&quot;</span>, classCommand<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #0000ff;">&quot;formResult.view&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Gerald</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-101</link>
		<dc:creator>Gerald</dc:creator>
		<pubDate>Wed, 21 Apr 2010 16:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-101</guid>
		<description>Is it posible validate the generated inputs?
Best Regards and Thanks for the information.</description>
		<content:encoded><![CDATA[<p>Is it posible validate the generated inputs?<br />
Best Regards and Thanks for the information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-100</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 14 Apr 2010 21:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-100</guid>
		<description>Hi there,

In that case, rather than using the @ModelAttribute function you could just populate the required object (by placing into the ModelMap) in the GET annotated controller method in that case the object would be populated when and only when the form is displayed. 

If you need to pre-populate the Class Command in this example such as calling into a database as you mention you can do so by all means. The AutoPopulating list of the class command can be updated in the same way as a java.util.List</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>In that case, rather than using the @ModelAttribute function you could just populate the required object (by placing into the ModelMap) in the GET annotated controller method in that case the object would be populated when and only when the form is displayed. </p>
<p>If you need to pre-populate the Class Command in this example such as calling into a database as you mention you can do so by all means. The AutoPopulating list of the class command can be updated in the same way as a java.util.List</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jovox</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-99</link>
		<dc:creator>jovox</dc:creator>
		<pubDate>Wed, 14 Apr 2010 21:04:38 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-99</guid>
		<description>I wrote a controller the same way you did (using annotations) as I wasn&#039;t able to translate it to non annotated code. 

I see one issue with your code and that is that getClassCommand will be called every time @ModelAttribute(&quot;classCommand&quot;) is injected. 

What about if you need your ClassCommand instance to be &quot;kept alive&quot; between the calls? 
That would be necessary if you did something else than just &quot;ClassCommand classCommand = new ClassCommand();&quot; in you getClassCommand() method. Loading a ClassCommand from the database for instance.</description>
		<content:encoded><![CDATA[<p>I wrote a controller the same way you did (using annotations) as I wasn&#8217;t able to translate it to non annotated code. </p>
<p>I see one issue with your code and that is that getClassCommand will be called every time @ModelAttribute(&#8220;classCommand&#8221;) is injected. </p>
<p>What about if you need your ClassCommand instance to be &#8220;kept alive&#8221; between the calls?<br />
That would be necessary if you did something else than just &#8220;ClassCommand classCommand = new ClassCommand();&#8221; in you getClassCommand() method. Loading a ClassCommand from the database for instance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jovox</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-98</link>
		<dc:creator>jovox</dc:creator>
		<pubDate>Tue, 13 Apr 2010 11:38:51 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-98</guid>
		<description>&quot;admin&quot;
The problem with just inherit SimpleFormController and override the two methods you mentioned is that SimpleFormController is not a MultiActionController which would be required to add appendStudentField for instance.</description>
		<content:encoded><![CDATA[<p>&#8220;admin&#8221;<br />
The problem with just inherit SimpleFormController and override the two methods you mentioned is that SimpleFormController is not a MultiActionController which would be required to add appendStudentField for instance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-97</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 13 Apr 2010 08:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-97</guid>
		<description>Hi there,

I have tested the download and everything seems fine.

After downloading and extracting the Zip file. In Eclipse Click File then Click Import and choose &#039;Existing projects into workspace...&#039; then on the next screen choose the downloaded folder.

After importing everything should build OK?</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I have tested the download and everything seems fine.</p>
<p>After downloading and extracting the Zip file. In Eclipse Click File then Click Import and choose &#8216;Existing projects into workspace&#8230;&#8217; then on the next screen choose the downloaded folder.</p>
<p>After importing everything should build OK?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mudzakkir</title>
		<link>http://eggsylife.co.uk/2009/11/30/spring-forms-dynamic-lists-and-ajax/comment-page-1/#comment-96</link>
		<dc:creator>mudzakkir</dc:creator>
		<pubDate>Mon, 12 Apr 2010 22:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=183#comment-96</guid>
		<description>I&#039;m sorry disturbing you.
I have downloaded the source. 
http://eggsylife.co.uk/SpringDynamicListsExample.zip
And I try to open the .zip package.. I think this package is broken. I have downloaded this file more than three times! Can you fix the package, and give the new download Link?</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry disturbing you.<br />
I have downloaded the source.<br />
<a href="http://eggsylife.co.uk/SpringDynamicListsExample.zip" rel="nofollow">http://eggsylife.co.uk/SpringDynamicListsExample.zip</a><br />
And I try to open the .zip package.. I think this package is broken. I have downloaded this file more than three times! Can you fix the package, and give the new download Link?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
