<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>André Kolell &#187; Ext JS</title>
	<atom:link href="http://blog.andrekolell.de/category/web-development/ext-js-web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.andrekolell.de</link>
	<description>... and what about Life!?</description>
	<lastBuildDate>Sun, 05 Sep 2010 17:11:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to use Ext JS with Pylons and Mako</title>
		<link>http://blog.andrekolell.de/2009/09/10/how-to-use-ext-js-with-pylons-and-mako/</link>
		<comments>http://blog.andrekolell.de/2009/09/10/how-to-use-ext-js-with-pylons-and-mako/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 04:25:57 +0000</pubDate>
		<dc:creator>Andre Kolell</dc:creator>
				<category><![CDATA[(Web) Development]]></category>
		<category><![CDATA[Ext JS]]></category>
		<category><![CDATA[Pylons Web Framework]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Pylons]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.andrekolell.de/?p=1187</guid>
		<description><![CDATA[In this little tutorial I will show you how to use the Python web framework Pylons and the Mako template library with the cross-browser JavaScript framework Ext JS. I will explain how to set up a complex layout (this means an Ext.Viewport) and how to dynamically load its contents and further functionality. First of all, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.andrekolell.de/wp-content/uploads/2009/09/ext_js_ajax.gif"><img class="alignright size-full wp-image-1200" title="ExtJS and AJAX" src="http://blog.andrekolell.de/wp-content/uploads/2009/09/ext_js_ajax.gif" alt="ExtJS and AJAX" width="241" height="159" /></a>In this little tutorial I will show you how to use the <a href="http://pylonshq.com/">Python web framework Pylons</a> and the <a href="http://www.makotemplates.org/">Mako template library</a> with the <a href="http://www.extjs.com/products/extjs/">cross-browser JavaScript framework Ext JS</a>.</p>
<p>I will explain how to set up a <a href="http://www.extjs.com/deploy/dev/examples/layout/complex.html">complex layout</a> (this means an Ext.Viewport) and how to dynamically load its contents and further functionality.</p>
<p>First of all, you need to <a href="http://pylonshq.com/docs/en/0.9.7/gettingstarted">set up Pylons</a> and a create a new project. Let&#8217;s  name it &#8220;PylonsAndExt&#8221;. During setup, mako needs to be selected as our template engine. We do not require SQLAlchemy support&#8230;</p>
<p><span id="more-1187"></span></p>
<blockquote>
<pre>paster create -t pylons PylonsAndExt</pre>
</blockquote>
<p>If you like to, verify that everything&#8217;s working well by serving the application (paster serve development.ini) and visiting http://127.0.0.1:5000.</p>
<p>Now we need a controller. Since this controller should provide us with our main application, we name it &#8220;application&#8221;:</p>
<blockquote>
<pre>paster controller application</pre>
</blockquote>
<p>To map the application controller&#8217;s index() action to the root URL of the project, add a new line to the main route map in <em>config/routing.py</em> just after &#8220;# CUSTOM ROUTES HERE&#8221; and empty the <em>public </em>directory (to avoid serving static files):</p>
<blockquote>
<pre>map.connect('/', controller='application', action='index')</pre>
</blockquote>
<p>Next, we modify the ApplicationController&#8217;s index() method so that it returns a mako template. Putting all our Ext JS code into mako files enables us to better internationalize and localize our JavaScript:</p>
<blockquote>
<pre>def index(self):
   return render('/application.mako')</pre>
</blockquote>
<p>To create an Ext.Viewport, we first need Ext. After <a href="http://www.extjs.com/products/extjs/download.php">downloading</a>, place all (relevant) Ext JS files in <em>public/ext</em>.  Inside <em>application.mako</em>, we can now generate our viewport:</p>
<blockquote>
<pre>&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Getting started with Pylons and Ext JS&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css"
    href="ext/resources/css/ext-all.css"/&gt;
  &lt;script src="ext/adapter/ext/ext-base.js"&gt;&lt;/script&gt;
  &lt;script src="ext/ext-all-debug.js"&gt;&lt;/script&gt;
  &lt;script&gt;
    Ext.onReady(function(){
      new Ext.Viewport({
        layout: 'border',
        items: [
          {region: 'north', height: 50},
          {region: 'west', width: 100},
          {region: 'south', height: 50},
          {region: 'east', width: 100},
          {region: 'center',
           xtype: 'tabpanel',
           items: [{
             title: 'Default Tab',
             html: 'The first tab\'s content.'
           }, {
             title: 'AJAX Tab',
             autoLoad: 'application/ajax'
           }]
        }]
      })
    });
  &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;&lt;/body&gt;
&lt;/html&gt;</pre>
</blockquote>
<p>Since we use AJAX to load the content of the second tab (&#8220;AJAX Tab&#8221;), we need to add the ajax() method we specified above to the ApplicationController:</p>
<blockquote>
<pre>def ajax(self):
   return 'Some AJAX Content'</pre>
</blockquote>
<p>Instead of returning a simple string, we could have used a mako template to return more sophisticated content again. Ok, that&#8217;s all really basic so far. I should continue with some more challenging functionalities within the next days&#8230;</p>
<p><em><strong>Any suggestions?</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andrekolell.de/2009/09/10/how-to-use-ext-js-with-pylons-and-mako/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ext JS Charts Problem: Y-Scale is always 0 to 1</title>
		<link>http://blog.andrekolell.de/2009/08/28/ext-js-charts-problem-y-scale-is-always-0-to-1/</link>
		<comments>http://blog.andrekolell.de/2009/08/28/ext-js-charts-problem-y-scale-is-always-0-to-1/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 13:58:07 +0000</pubDate>
		<dc:creator>Andre Kolell</dc:creator>
				<category><![CDATA[(Web) Development]]></category>
		<category><![CDATA[Ext JS]]></category>

		<guid isPermaLink="false">http://blog.andrekolell.de/?p=1128</guid>
		<description><![CDATA[During the last few hours I was playing around with Ext JS charts. I got stuck for a while because the height of my y-axis was limited to one; no matter what I tried and how high the numbers of my records were &#8211; the y-scale was fixed to 1. After some time I figured [...]]]></description>
			<content:encoded><![CDATA[<p>During the last few hours I was playing around with Ext JS charts. I got stuck for a while because the height of my y-axis was limited to one; no matter what I tried and how high the numbers of my records were &#8211; the y-scale was fixed to 1.</p>
<p><center><img class="size-full wp-image-1130 aligncenter" title="Ext JS chart" src="http://blog.andrekolell.de/wp-content/uploads/2009/08/wrong_chart.gif" alt="Ext JS chart" width="450" height="200" style="margin-bottom:10px;"/></center></p>
<p>After some time I figured out that there&#8217;s a <a href="http://fr2.php.net/manual/fr/function.json-encode.php#86513">problem with PHP&#8217;s json_encode()</a>. Due to that problem I formatted the data for my chart as strings (with quotation marks) instead of integers (without quotation marks).</p>
<p>There are <strong>two solutions</strong> to fix this problem: First, you can make sure that the PHP variables that contain integers are really numeric types (and not strings). The second, much easier solution, is to properly define the Ext JS fields for the charts:</p>
<blockquote>
<pre>fields = [
  {name: 'interval'},
  {name: 'field1', <strong>type: 'int'</strong>},
  {name: 'field2', <strong>type: 'int'</strong>}
];</pre>
</blockquote>
<p><em>And that&#8217;s it!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andrekolell.de/2009/08/28/ext-js-charts-problem-y-scale-is-always-0-to-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ext JS &#8211; How to reload a GridPanel&#8217;s DataStore</title>
		<link>http://blog.andrekolell.de/2009/08/20/ext-js-how-to-reload-a-gridpanels-datastore/</link>
		<comments>http://blog.andrekolell.de/2009/08/20/ext-js-how-to-reload-a-gridpanels-datastore/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 10:40:08 +0000</pubDate>
		<dc:creator>Andre Kolell</dc:creator>
				<category><![CDATA[Ext JS]]></category>

		<guid isPermaLink="false">http://blog.andrekolell.de/?p=1097</guid>
		<description><![CDATA[Although it is quite easy to reload the data that underlies an Ext JS GridPanel, I spent some time figuring out how to do it, especially because the first result on my search on Google leaded me into a wrong direction&#8230; Ext.getCmp('&#60;GridPanel-ID&#62;').getStore().reload(); That&#8217;s all you need! Get your GridPanel by its ID and reload its [...]]]></description>
			<content:encoded><![CDATA[<p>Although it is quite easy to reload the data that underlies an Ext JS GridPanel, I spent some time figuring out how to do it, especially because the <a href="http://extjs.com/forum/showthread.php?t=61641">first result</a> on my search on Google leaded me into a wrong direction&#8230;</p>
<blockquote>
<pre>Ext.getCmp('&lt;GridPanel-ID&gt;').getStore().reload();</pre>
</blockquote>
<p>That&#8217;s all you need! Get your GridPanel by its ID and reload its DataStore. The data will be fetched from the ressource specified and the GUI will be refereshed immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andrekolell.de/2009/08/20/ext-js-how-to-reload-a-gridpanels-datastore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experimente mit Ext JS&#8230;</title>
		<link>http://blog.andrekolell.de/2009/07/31/experimente-mit-ext-js/</link>
		<comments>http://blog.andrekolell.de/2009/07/31/experimente-mit-ext-js/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 14:50:58 +0000</pubDate>
		<dc:creator>Andre Kolell</dc:creator>
				<category><![CDATA[(Web) Development]]></category>
		<category><![CDATA[Ext JS]]></category>
		<category><![CDATA[MICT-Studium an der UWS]]></category>
		<category><![CDATA[Persönliches]]></category>
		<category><![CDATA[MICT]]></category>
		<category><![CDATA[University of Western Sydney]]></category>
		<category><![CDATA[Visitor Statistics]]></category>
		<category><![CDATA[Web Analytics]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.andrekolell.de/?p=1026</guid>
		<description><![CDATA[Nachdem ich im Rahmen meiner Tätigkeit für blueSummit meine ersten Erfahrungen mit dem JavaScript-Framework YUI habe sammeln können, habe ich vor einigen Monaten Ext JS kennen (und lieben) gelernt. Inzwischen habe ich mit Ext JS, ebenfalls für blueSummit, auch ein erstes Tool erstellt, welches bereits ziemlich viele Möglichkeiten von Ext JS nutzt. Hier ein Eindruck [...]]]></description>
			<content:encoded><![CDATA[<p>Nachdem ich im Rahmen meiner Tätigkeit für <a href="http://www.bluesummit.de">blueSummit</a> meine ersten Erfahrungen mit dem <a href="http://developer.yahoo.com/yui/">JavaScript-Framework YUI</a> habe sammeln können, habe ich vor einigen Monaten <a href="http://extjs.com/products/extjs/">Ext JS</a> kennen (und lieben) gelernt. Inzwischen habe ich mit Ext JS, ebenfalls für blueSummit, auch ein erstes Tool erstellt, welches bereits ziemlich viele Möglichkeiten von Ext JS nutzt. Hier ein Eindruck von der gut aussehenden, intuitiv zu bedienenden und einfach zu programmierenden Oberfläche:</p>
<p><center><img class="aligncenter size-full wp-image-1028" title="blueSummit Spider" src="http://blog.andrekolell.de/wp-content/uploads/2009/07/screenshot-32.jpg" alt="blueSummit Spider" width="320" height="240" style="margin-bottom:10px;"/></center></p>
<p>Nun geht es auch direkt mit Ext JS weiter. Mit einem Kommilitonen werde ich im gerade beginnenden Semester im Rahmen eines Forschungsprojektes an der University of Western Sydney (UWS) die Web Analytics Anforderungen von Blog-Betreibern identifizieren und in Form eines WordPress-Plugins für Besucher-Statistiken umsetzen. Dabei wollen wir auch Ext JS verwenden (was grundsätzlich kein Problem ist, wie ich vor einigen Monaten <a href="http://blog.andrekolell.de/2009/04/15/using-an-ext-js-datagrid-with-ajax-in-the-wordpress-administration-panel/">bereits ausprobiert</a> habe). Für das Projekt haben wir eine Website ins Leben gerufenen &#8211; <a href="http://www.wopsta.org">wopsta.org &#8211; WordPress Visitor Statistics</a>. Dort werden wir über Fortschritte in Forschung und Entwicklung berichten. Soweit der Plan. Mal schauen wie es in rund vier Monaten, gegen Ende des Semesters, aussieht&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andrekolell.de/2009/07/31/experimente-mit-ext-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
