<?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: Playing with AjaxContext</title>
	<atom:link href="http://www.zendframeworkinaction.com/2008/01/07/playing-with-ajaxcontext/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zendframeworkinaction.com/2008/01/07/playing-with-ajaxcontext/</link>
	<description>A book about the Zend Framework</description>
	<pubDate>Sat, 22 Nov 2008 05:42:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Umpirsky</title>
		<link>http://www.zendframeworkinaction.com/2008/01/07/playing-with-ajaxcontext/#comment-125</link>
		<dc:creator>Umpirsky</dc:creator>
		<pubDate>Sat, 03 May 2008 11:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendframeworkbook.com/2008/01/07/playing-with-ajaxcontext/#comment-125</guid>
		<description>&lt;p&gt;I didn't mentioned that my ajaxable attribute is&lt;/p&gt;

&lt;p&gt;public $ajaxable = array('convert'=&#62;array('json'));&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t mentioned that my ajaxable attribute is</p>

<p>public $ajaxable = array(&#8217;convert&#8217;=&gt;array(&#8217;json&#8217;));</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Umpirsky</title>
		<link>http://www.zendframeworkinaction.com/2008/01/07/playing-with-ajaxcontext/#comment-124</link>
		<dc:creator>Umpirsky</dc:creator>
		<pubDate>Sat, 03 May 2008 11:49:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendframeworkbook.com/2008/01/07/playing-with-ajaxcontext/#comment-124</guid>
		<description>&lt;p&gt;I've done it like this, but 3 problems occured:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;My view script (convert.json.phtml in my case) is not rendered, even if I have:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;class AjaxController extends Zend_Controller_Action
{
    public $ajaxable = array('convert'=&#62;array('json'));&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public function preDispatch()
{
    $this-&#62;_request-&#62;setParam('format', 'json');
    $this-&#62;_helper-&#62;ajaxContext()-&#62;initContext();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I cannot acces post data in my controller with:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;$this-&#62;getRequest('text');&lt;/p&gt;

&lt;p&gt;even If $_POST['text'] is set and I can use it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When I echo something in my ajax controller action, [] is appended to start of my response to the client. Headers are properly set to json.&lt;/li&gt;
&lt;/ol&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve done it like this, but 3 problems occured:</p>

<ol>
<li>My view script (convert.json.phtml in my case) is not rendered, even if I have:</li>
</ol>

<p>class AjaxController extends Zend_Controller_Action
{
    public $ajaxable = array(&#8217;convert&#8217;=&gt;array(&#8217;json&#8217;));</p>

<pre><code>public function preDispatch()
{
    $this-&gt;_request-&gt;setParam('format', 'json');
    $this-&gt;_helper-&gt;ajaxContext()-&gt;initContext();
}
</code></pre>

<p>&#8230;</p>

<p>}</p>

<ol>
<li>I cannot acces post data in my controller with:</li>
</ol>

<p>$this-&gt;getRequest(&#8217;text&#8217;);</p>

<p>even If $_POST['text'] is set and I can use it.</p>

<ol>
<li>When I echo something in my ajax controller action, [] is appended to start of my response to the client. Headers are properly set to json.</li>
</ol>]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.zendframeworkinaction.com/2008/01/07/playing-with-ajaxcontext/#comment-8</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Sun, 13 Jan 2008 21:13:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendframeworkbook.com/2008/01/07/playing-with-ajaxcontext/#comment-8</guid>
		<description>&lt;p&gt;Hi Sven,&lt;/p&gt;

&lt;p&gt;The helper is intended to ensure that you can send back the correct format to the browser.&lt;/p&gt;

&lt;p&gt;For the second point: I didn't handle html escaping properly here in the post whilst implementing the syntax highlighting. Should be fixed now.&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Rob..&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Sven,</p>

<p>The helper is intended to ensure that you can send back the correct format to the browser.</p>

<p>For the second point: I didn&#8217;t handle html escaping properly here in the post whilst implementing the syntax highlighting. Should be fixed now.</p>

<p>Regards,</p>

<p>Rob..</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sven</title>
		<link>http://www.zendframeworkinaction.com/2008/01/07/playing-with-ajaxcontext/#comment-7</link>
		<dc:creator>Sven</dc:creator>
		<pubDate>Sun, 13 Jan 2008 21:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendframeworkbook.com/2008/01/07/playing-with-ajaxcontext/#comment-7</guid>
		<description>&lt;p&gt;A couple of questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If "This action is already "ajaxed"" then why do you need to use this ajax helper?&lt;/li&gt;
&lt;li&gt;In the array you set up for $ajaxable why does feedback = &#38;gt?&lt;/li&gt;
&lt;/ul&gt;
</description>
		<content:encoded><![CDATA[<p>A couple of questions:</p>

<ul>
<li>If &#8220;This action is already &#8220;ajaxed&#8221;" then why do you need to use this ajax helper?</li>
<li>In the array you set up for $ajaxable why does feedback = &amp;gt?</li>
</ul>]]></content:encoded>
	</item>
	<item>
		<title>By: Fercho</title>
		<link>http://www.zendframeworkinaction.com/2008/01/07/playing-with-ajaxcontext/#comment-6</link>
		<dc:creator>Fercho</dc:creator>
		<pubDate>Wed, 09 Jan 2008 19:32:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendframeworkbook.com/2008/01/07/playing-with-ajaxcontext/#comment-6</guid>
		<description>&lt;p&gt;Can you put the code to download ? It could be nice so we can learn more about this interested helper.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Can you put the code to download ? It could be nice so we can learn more about this interested helper.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Weier O'Phinney</title>
		<link>http://www.zendframeworkinaction.com/2008/01/07/playing-with-ajaxcontext/#comment-5</link>
		<dc:creator>Matthew Weier O'Phinney</dc:creator>
		<pubDate>Tue, 08 Jan 2008 02:03:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendframeworkbook.com/2008/01/07/playing-with-ajaxcontext/#comment-5</guid>
		<description>&lt;p&gt;One note -- you don't have to setup the helper in your bootstrap; helpers such as this one can be loaded on-demand in your controllers simply by invoking them: $this-&#62;_helper-&#62;ajaxContext-&#62;initContext().&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>One note &#8212; you don&#8217;t have to setup the helper in your bootstrap; helpers such as this one can be loaded on-demand in your controllers simply by invoking them: $this-&gt;_helper-&gt;ajaxContext-&gt;initContext().</p>]]></content:encoded>
	</item>
</channel>
</rss>
