<?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>American Butifarra &#187; Tutorials</title> <atom:link href="http://claude.betancourt.us/tag/tutorials/feed/" rel="self" type="application/rss+xml" /><link>http://claude.betancourt.us</link> <description>Claude Betancourt&#039;s Personal Blog</description> <lastBuildDate>Fri, 16 Dec 2011 02:43:25 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>ExtJS ComboBox Hidden Field Issues</title><link>http://claude.betancourt.us/extjs-combobox-hidden-field-issues/</link> <comments>http://claude.betancourt.us/extjs-combobox-hidden-field-issues/#comments</comments> <pubDate>Tue, 09 Mar 2010 18:57:26 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Ext JS]]></category> <category><![CDATA[Framework]]></category> <category><![CDATA[How-To]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Ext JS 3]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=721</guid> <description><![CDATA[Despite looking like a typical select box, Ext.form.ComboBox does not behave exactly as you would expect. It submits the display text instead of the selected option's value. This post provides a solution to this problem. <a href="http://claude.betancourt.us/extjs-combobox-hidden-field-issues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p class="alert">This post refers to version 3.x of the Ext-JS framework.</p><p>Despite looking like a typical select box, <a href="http://www.extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox"><strong>Ext.form.ComboBox</strong></a> doesn&#8217;t behave exactly as you would expect since it submits the display text instead of the selected option&#8217;s value. The documentation states:</p><blockquote><p>A ComboBox works in a similar manner to a traditional HTML &lt;select&gt; field. The difference is that to submit the valueField, you must specify a hiddenName to create a hidden input field to hold the value of the valueField. The displayField is shown in the text field which is named according to the name.</p></blockquote><pre class="brush: jscript; highlight: [5,6]; title: ; notranslate">
this.add([
	{
		xtype: 'combo',
		name: 'suffix',
		hiddenName: 'suffixId', // post this name
		hiddenValue: 0, // default value
		fieldLabel: 'Suffix',
		mode: 'local',
		store: this.suffixStore,
		valueField: 'key',
		displayField: 'display',
		triggerAction: 'all',
		forceSelection: true,
		allowBlank: true
	}
]);
</pre><p>Adding a <strong>hiddenName</strong> and a default value in <strong>hiddenValue</strong> does the trick, the default value (0) is set in the hidden field until a user chooses a different value. Unfortunately this breaks when the ComboBox is set to allow blanks and the user tabs over the field. When this happens, the hiddenValue is set to a null string and the user is never prompted to select a value.</p><p>Upon form submission, the hiddenField (<strong>suffixId</strong>) will be set to neither the default nor a valid value.</p><p>One solution is to listen for the <strong>focus</strong> and <strong>blur</strong> events to reset the value of the hidden field when it has been set to a null string.</p><pre class="brush: jscript; highlight: [15,16,17,18,19]; title: ; notranslate">
this.add([
	{
		xtype: 'combo',
		name: 'suffix',
		hiddenName: 'suffixId',
		hiddenValue: 0,
		fieldLabel: 'Suffix',
		mode: 'local',
		store: this.suffixStore,
		valueField: 'key',
		displayField: 'display',
		triggerAction: 'all',
		forceSelection: true,
		allowBlank: true,
		listeners: {
			'focus': this.handleSuffixChange,
			'blur': this.handleSuffixChange,
			scope: this
		}
	}
]);

handleSuffixChange: function(field) {
	if (field.value==='') {
		field.hiddenField.value = '0';
	}
}
</pre><p>Upon form submission you will be guaranteed a valid value, which is especially beneficial if you&#8217;re using the form values to populate a server side bean object.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/extjs-combobox-hidden-field-issues/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Ext-JS Tasks &amp; Progressbars a Match Made in Heaven</title><link>http://claude.betancourt.us/ext-js-tasks-progressbars-a-match-made-in-heaven/</link> <comments>http://claude.betancourt.us/ext-js-tasks-progressbars-a-match-made-in-heaven/#comments</comments> <pubDate>Wed, 29 Oct 2008 12:25:46 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Articles]]></category> <category><![CDATA[Ext JS]]></category> <category><![CDATA[Tutorials]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=184</guid> <description><![CDATA[Chris Boersma posted this example of using TaskRunner and TaskManager to keep a user informed while a task is handled server-side.]]></description> <content:encoded><![CDATA[<p><span class="drop_cap">C</span>hris Boersma posted <strong><a href="http://www.kungfuice.com/index.php/2008/10/29/ext-js-tasks-progressbars-a-match-made-in-heaven/">this example</a></strong> of using TaskRunner and TaskManager to keep a user informed while a task is handled server-side.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/ext-js-tasks-progressbars-a-match-made-in-heaven/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Tutorial: Ext-JS Charting and Mapping with Google Visualizations</title><link>http://claude.betancourt.us/tutorial-ext-charting-and-mapping-with-google-visualizations/</link> <comments>http://claude.betancourt.us/tutorial-ext-charting-and-mapping-with-google-visualizations/#comments</comments> <pubDate>Tue, 14 Oct 2008 02:27:57 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Ext JS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Data]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Library]]></category> <category><![CDATA[LinkedIn]]></category> <category><![CDATA[Visualization]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=159</guid> <description><![CDATA[Aaron Conran posted an entry about Ext.ux.GVisualizationPanel, a user extension that takes advantage of the similarities between the Ext data store and Google's data table to allow reuse of an Ext data store with Google's Visualization API. <a href="http://claude.betancourt.us/tutorial-ext-charting-and-mapping-with-google-visualizations/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a href="http://extjs.com/blog/2008/10/13/google-visualization/">Aaron Conran posted an entry</a> about Ext.ux.GVisualizationPanel, a user extension that takes advantage of the similarities between the Ext data store and Google&#8217;s data table to allow reuse of an Ext data store with Google&#8217;s Visualization API.</p><div><a href="http://code.betancourt.us/ext-google-visualization/"><img src="/images/blog/assets/timeline-full.jpg?2ce803" border="0" alt="" /></a></div><p><a href="http://code.betancourt.us/ext-google-visualization/"><strong>Proceed to the tutorial</strong></a>.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/tutorial-ext-charting-and-mapping-with-google-visualizations/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Tutorial: Flickr Photo Gallery</title><link>http://claude.betancourt.us/flickr-photo-gallery/</link> <comments>http://claude.betancourt.us/flickr-photo-gallery/#comments</comments> <pubDate>Sat, 04 Oct 2008 00:02:56 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[Ext JS]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Ajax]]></category> <category><![CDATA[Demo]]></category> <category><![CDATA[Flickr]]></category> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://localhost/?p=45</guid> <description><![CDATA[This demo shows you how to retrieve today's top rated photos from <strong>Flickr</strong> as well as the most recent uploads using jQuery and phpFlickr. <a href="http://claude.betancourt.us/flickr-photo-gallery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><span class="drop_cap">T</span><a href="http://code.betancourt.us/flickr/"><strong>his demo</strong></a> shows you how to retrieve today&#8217;s top rated photos from <strong>Flickr</strong> as the most recent uploads using jQuery and phpFlickr.</p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/flickr-photo-gallery/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Creating an Apple Style Menu with Animation</title><link>http://claude.betancourt.us/create-apple-style-top-navigation/</link> <comments>http://claude.betancourt.us/create-apple-style-top-navigation/#comments</comments> <pubDate>Mon, 28 Jul 2008 22:23:29 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[How-To]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Apple]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Photoshop]]></category> <category><![CDATA[Sprites]]></category><guid isPermaLink="false">http://claude.betancourt.us/blog/?p=107</guid> <description><![CDATA[Kriesi Budschedl has posted a very detailed tutorial to help you build your own Apple.com style menu and adds a nice touch by animating it. <a href="http://claude.betancourt.us/create-apple-style-top-navigation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><span class="drop_cap">K</span>riesi Budschedl has <a href="http://www.kriesi.at/archives/apple-menu-improved-with-jquery"><b>posted a very detailed tutorial</b></a> to help you build your own Apple.com style menu and adds a nice touch by animating it.</p><p><img class="alignleft frame" src="/images/blog/assets/tutorial-kwicks-home.jpg?2ce803" border="0" /></p><p>To construct the basic menu, Kriesi takes advantage of <a href="http://www.alistapart.com/articles/sprites" title="CSS Sprites: Image Slicing's Kiss of Death">CSS Sprites</a>, a technique to reduce the number of image files necessary to accomplish things like rollovers, without the need to preload the images using JavaScript.</p><p>A single image contains all the navigation menu options in their normal and active states and CSS rules are used to move the appropriate menu option into view. Once the basic menu is working, animation is added by using <a href="http://www.jeremymartin.name/projects.php?project=kwicks">Kwicks for jQuery</a>, a plugin written by Jerry Martin, resulting in the <a href="http://www.kriesi.at/wp-content/extra_data/kwicks_tutorial/kwicks_final.html">final product seen here</a>.</p><p><a href="http://www.kriesi.at/wp-content/extra_data/kwicks_tutorial/kwicks_final.html" title="Final product"><img class="aligncenter" src="/images/blog/assets/tutorial-kwicks-working-menu.png?2ce803" border="0" /></a></p> ]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/create-apple-style-top-navigation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: claude.betancourt.us @ 2012-02-07 14:57:09 by W3 Total Cache -->
