<?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"
	>
<channel>
	<title>Comments on: Grails and JSONP: How Easy is That?</title>
	<atom:link href="http://www.pathf.com/blogs/2008/02/grails-and-json/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pathf.com/blogs/2008/02/grails-and-json/</link>
	<description>Running commentary about agile development, user experience design and Ajax.</description>
	<pubDate>Fri, 21 Nov 2008 22:48:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: grandfatha</title>
		<link>http://www.pathf.com/blogs/2008/02/grails-and-json/#comment-88</link>
		<dc:creator>grandfatha</dc:creator>
		<pubDate>Tue, 04 Mar 2008 06:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=69#comment-88</guid>
		<description>&lt;p&gt;Actually you can eliminate a lot of code in there if you use the "content negotiation" feature of Grails.&lt;/p&gt;

&lt;p&gt;It looks like this:&lt;/p&gt;

&lt;p&gt;import grails.converters.*&lt;br /&gt;
class BookController {&lt;br /&gt;
def books&lt;br /&gt;
def list = {&lt;br /&gt;
this.books = Book.list()&lt;br /&gt;
withFormat {&lt;br /&gt;
html bookList:books&lt;br /&gt;
js { render "alert('hello')" } &lt;br /&gt;
xml { render books as XML }&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
Read more about it if you like in the Grails reference docu: &lt;a href="http://grails.org/doc/1.0.x/guide/6.%20The%20Web%20Layer.html#6.8%20Content%20Negotiation" rel="nofollow"&gt;http://grails.org/doc/1.0.x/guide/6.%20The%20Web%20Layer.html#6.8%20Content%20Negotiation&lt;/a&gt;&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Actually you can eliminate a lot of code in there if you use the &#8220;content negotiation&#8221; feature of Grails.</p>
<p>It looks like this:</p>
<p>import grails.converters.*<br />
class BookController {<br />
def books<br />
def list = {<br />
this.books = Book.list()<br />
withFormat {<br />
html bookList:books<br />
js { render &#8220;alert(&#8217;hello&#8217;)&#8221; } <br />
xml { render books as XML }<br />
}<br />
}<br />
}</p>
<p>
Read more about it if you like in the Grails reference docu: <a href="http://grails.org/doc/1.0.x/guide/6.%20The%20Web%20Layer.html#6.8%20Content%20Negotiation" rel="nofollow">http://grails.org/doc/1.0.x/guide/6.%20The%20Web%20Layer.html#6.8%20Content%20Negotiation</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
