<?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: Grails one-to-many dynamic forms</title>
	<atom:link href="http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/</link>
	<description></description>
	<lastBuildDate>Wed, 09 May 2012 09:53:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: mexposito</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-8273</link>
		<dc:creator>mexposito</dc:creator>
		<pubDate>Wed, 09 May 2012 09:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-8273</guid>
		<description>Hi!

I&#039;ve tried to run the project in grails 2.0.3 with no luck: validation erros appear for no reason (all fields are filled) in phone records, even if I remove validation constraints in the domain class. Really weird...
 
Also, I&#039;m trying to implement my own set of domain classes following the example suggested in this blog. I have some doubts about params binding, I mean:

The property for storing &#039;phones&#039; in the domain class of Contact is a List called &#039;phones&#039;; however, the param filled with the introduced data is called &#039;phonesList&#039;. There is no map in the controller between &#039;phonesList&#039; and the &#039;phones&#039; property of class &#039;contact&#039;, how is the list saved?

I&#039;ve been trying to change the name &#039;phonesList&#039; to &#039;phones&#039; , as it is suggested in a previous comment , but I get the following error: java.lang.NumberFormatException: For input string: &quot;_clone&quot;

Any thoughts?</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I&#8217;ve tried to run the project in grails 2.0.3 with no luck: validation erros appear for no reason (all fields are filled) in phone records, even if I remove validation constraints in the domain class. Really weird&#8230;</p>
<p>Also, I&#8217;m trying to implement my own set of domain classes following the example suggested in this blog. I have some doubts about params binding, I mean:</p>
<p>The property for storing &#8216;phones&#8217; in the domain class of Contact is a List called &#8216;phones&#8217;; however, the param filled with the introduced data is called &#8216;phonesList&#8217;. There is no map in the controller between &#8216;phonesList&#8217; and the &#8216;phones&#8217; property of class &#8216;contact&#8217;, how is the list saved?</p>
<p>I&#8217;ve been trying to change the name &#8216;phonesList&#8217; to &#8216;phones&#8217; , as it is suggested in a previous comment , but I get the following error: java.lang.NumberFormatException: For input string: &#8220;_clone&#8221;</p>
<p>Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hjkhkjhkjh</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-7863</link>
		<dc:creator>hjkhkjhkjh</dc:creator>
		<pubDate>Wed, 18 Apr 2012 14:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-7863</guid>
		<description>Fix your code not to treat the hidden fields and the phone input field differently.

.find().attr().attr() is fine. Don&#039;t do var x = find(); x.attr().attr it is a visual blight.</description>
		<content:encoded><![CDATA[<p>Fix your code not to treat the hidden fields and the phone input field differently.</p>
<p>.find().attr().attr() is fine. Don&#8217;t do var x = find(); x.attr().attr it is a visual blight.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nont Banditwong</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-6662</link>
		<dc:creator>Nont Banditwong</dc:creator>
		<pubDate>Wed, 29 Feb 2012 04:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-6662</guid>
		<description>Thanks for article, very helpful for me.

How did you handle the form data binding and constraints if some of phone index skipped, such as create 
4 empty phone number rows then delete 1st and 3rd record, fill in available record and submit.

Now available phone map is phonesList[1] and phonesList[3]. 

From Grails document ,
&quot;Grails will automatically create a new instance for you at the defined position. If you &quot;skipped&quot; a few elements in the middle:&quot;
http://grails.org/doc/latest/guide/theWebLayer.html#6.6%20Filters

If you apply constraints on domain class, it would fail when binding data, if you faces this problem how did you solve it.

Thanks.</description>
		<content:encoded><![CDATA[<p>Thanks for article, very helpful for me.</p>
<p>How did you handle the form data binding and constraints if some of phone index skipped, such as create<br />
4 empty phone number rows then delete 1st and 3rd record, fill in available record and submit.</p>
<p>Now available phone map is phonesList[1] and phonesList[3]. </p>
<p>From Grails document ,<br />
&#8220;Grails will automatically create a new instance for you at the defined position. If you &#8220;skipped&#8221; a few elements in the middle:&#8221;<br />
<a href="http://grails.org/doc/latest/guide/theWebLayer.html#6.6%20Filters" rel="nofollow">http://grails.org/doc/latest/guide/theWebLayer.html#6.6%20Filters</a></p>
<p>If you apply constraints on domain class, it would fail when binding data, if you faces this problem how did you solve it.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: win</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-6488</link>
		<dc:creator>win</dc:creator>
		<pubDate>Sat, 18 Feb 2012 16:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-6488</guid>
		<description>I test in 2.0.1. It work fine.
when I change &quot;phonesList&quot; to &quot;phones&quot; in gsp files and remove getPhonesList method in Contact class.</description>
		<content:encoded><![CDATA[<p>I test in 2.0.1. It work fine.<br />
when I change &#8220;phonesList&#8221; to &#8220;phones&#8221; in gsp files and remove getPhonesList method in Contact class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: win</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-6483</link>
		<dc:creator>win</dc:creator>
		<pubDate>Sat, 18 Feb 2012 10:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-6483</guid>
		<description>Me too</description>
		<content:encoded><![CDATA[<p>Me too</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephane Rainville</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-6296</link>
		<dc:creator>Stephane Rainville</dc:creator>
		<pubDate>Tue, 07 Feb 2012 03:39:54 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-6296</guid>
		<description>Great post !
Error validation seems to be an issue still.

On a parent.save (with errors in child) the parent.errors contains duplicate entries in a weird format
(and child objects errors are empty)
childItem[0][1].description  don&#039;t understand
childItem[1][2].description  don&#039;t understand
childItem[0].description Great
childItem[1].description  Great

If I loop thru the child, I get errors in the child object (yeah) but still duplicate entries in the parent when I call save.

Any clues?

So far my complex solution would be to loop thru the children, highlight the errors BEFORE calling save. Once validate on all child items passes THEN call save.</description>
		<content:encoded><![CDATA[<p>Great post !<br />
Error validation seems to be an issue still.</p>
<p>On a parent.save (with errors in child) the parent.errors contains duplicate entries in a weird format<br />
(and child objects errors are empty)<br />
childItem[0][1].description  don&#8217;t understand<br />
childItem[1][2].description  don&#8217;t understand<br />
childItem[0].description Great<br />
childItem[1].description  Great</p>
<p>If I loop thru the child, I get errors in the child object (yeah) but still duplicate entries in the parent when I call save.</p>
<p>Any clues?</p>
<p>So far my complex solution would be to loop thru the children, highlight the errors BEFORE calling save. Once validate on all child items passes THEN call save.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paulo</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-5954</link>
		<dc:creator>Paulo</dc:creator>
		<pubDate>Mon, 16 Jan 2012 19:54:35 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-5954</guid>
		<description>Thanks Rob. it seems to be working fine now.  I also had to fix my view - the select field to a proper name:
name=&quot;productItemList[${i}].product.id&quot;

thanks</description>
		<content:encoded><![CDATA[<p>Thanks Rob. it seems to be working fine now.  I also had to fix my view &#8211; the select field to a proper name:<br />
name=&#8221;productItemList[${i}].product.id&#8221;</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-5866</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Wed, 11 Jan 2012 19:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-5866</guid>
		<description>See last comment on http://stackoverflow.com/questions/8636503/how-to-recover-from-dont-flush-the-session-after-an-exception-occurs-error/8822560#8822560</description>
		<content:encoded><![CDATA[<p>See last comment on <a href="http://stackoverflow.com/questions/8636503/how-to-recover-from-dont-flush-the-session-after-an-exception-occurs-error/8822560#8822560" rel="nofollow">http://stackoverflow.com/questions/8636503/how-to-recover-from-dont-flush-the-session-after-an-exception-occurs-error/8822560#8822560</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paulo</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-5865</link>
		<dc:creator>Paulo</dc:creator>
		<pubDate>Wed, 11 Jan 2012 18:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-5865</guid>
		<description>Very good article, thanks for sharing.  I&#039;m new to Grails, so if anyone can help me, I&#039;d really appreciate.  I&#039;m trying to extend this example by associating Phone with a third domain called &quot;product&quot;.
so, in my phone domain I have a line for:
 static belongsTo =  [contact: Contact, product:Product]

In my  Product domain:
	 static hasMany =[phones: Phone]

In my phone view:

  

When I try to save, I get an error message:
Property [product] of class [class com.easyinvt.Phone] cannot be null

It seems that Grails is not automatically mapping my product id to the Phone class. 
Note: I&#039;m using Grails 2.0

Thank you for the help
Paulo</description>
		<content:encoded><![CDATA[<p>Very good article, thanks for sharing.  I&#8217;m new to Grails, so if anyone can help me, I&#8217;d really appreciate.  I&#8217;m trying to extend this example by associating Phone with a third domain called &#8220;product&#8221;.<br />
so, in my phone domain I have a line for:<br />
 static belongsTo =  [contact: Contact, product:Product]</p>
<p>In my  Product domain:<br />
	 static hasMany =[phones: Phone]</p>
<p>In my phone view:</p>
<p>When I try to save, I get an error message:<br />
Property [product] of class [class com.easyinvt.Phone] cannot be null</p>
<p>It seems that Grails is not automatically mapping my product id to the Phone class.<br />
Note: I&#8217;m using Grails 2.0</p>
<p>Thank you for the help<br />
Paulo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://omarello.com/2010/08/grails-one-to-many-dynamic-forms/#comment-5864</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Wed, 11 Jan 2012 15:48:12 +0000</pubDate>
		<guid isPermaLink="false">http://omarello.com/?p=13#comment-5864</guid>
		<description>I&#039;am using Grails 2.0 and it throws the follwong exception in the save action:
null id in test.TargetEvaluation entry (don&#039;t flush the Session after an exception occurs)
org.hibernate.AssertionFailure: null id in ....

It works fine in 1.3.7. And the data sent is the same. Has anyone the same issue?
Looks like the cascade does not work...</description>
		<content:encoded><![CDATA[<p>I&#8217;am using Grails 2.0 and it throws the follwong exception in the save action:<br />
null id in test.TargetEvaluation entry (don&#8217;t flush the Session after an exception occurs)<br />
org.hibernate.AssertionFailure: null id in &#8230;.</p>
<p>It works fine in 1.3.7. And the data sent is the same. Has anyone the same issue?<br />
Looks like the cascade does not work&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

