<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Sathishonflex&#039;s Blog</title>
	<atom:link href="http://sathishonflex.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sathishonflex.wordpress.com</link>
	<description>Innovation begins from here</description>
	<lastBuildDate>Mon, 09 May 2011 09:43:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sathishonflex.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Sathishonflex&#039;s Blog</title>
		<link>http://sathishonflex.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sathishonflex.wordpress.com/osd.xml" title="Sathishonflex&#039;s Blog" />
	<atom:link rel='hub' href='http://sathishonflex.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Comparison of Services in flex (Webservice, Remote Object and Http services), how to send parameters through web service or remote object or http service</title>
		<link>http://sathishonflex.wordpress.com/2010/03/02/comparsion-of-services-in-flex/</link>
		<comments>http://sathishonflex.wordpress.com/2010/03/02/comparsion-of-services-in-flex/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 12:06:43 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=113</guid>
		<description><![CDATA[&#60;mx:HTTPService result=&#8221;handleResult(event);&#8221; fault=&#8221;handleFault(event);&#8221; id=&#8221;hsService&#8221; resultFormat=&#8221;e4x&#8221; method=&#8221;POST&#8221;  url=&#8221;{Url Here}&#8221; useProxy=&#8221;false&#8221;&#62; &#60;mx:request xmlns=&#8221;"&#62; &#60;id&#62;{value}&#60;/id&#62; &#60;sFileName&#62;{sFilename}&#60;/sFileName&#62; &#60;sFileType&#62;{sFiletype}&#60;/sFileType&#62; &#60;sTypeRes&#62;{sTypeRes}&#60;/sTypeRes&#62; &#60;/mx:request&#62; &#60;/mx:HTTPService&#62; &#60;mx:RemoteObject id=&#8221;reomteobjectid&#8221; destination=&#8221;amfphp&#8221; endpoint=&#8221;http://localhost/amfphp/gateway.php?&#8221; source=&#8221;ProjectName.filename&#8221; &#62; &#60;mx:method name=&#8221;userLogout&#8221; result=&#8221;handleResult(event)&#8221; fault=&#8221;handleFault(event)&#8221;&#62; &#60;mx:arguments&#62; &#60;username&#62;{userName}&#60;/username&#62; &#60;password&#62;{password}&#60;/password&#62; &#60;/mx:arguments&#62; &#60;/mx:method&#62; &#60;/mx:RemoteObject&#62; &#60;mx:WebService id=&#8221;webserviceid&#8221; wsdl=&#8221;{http://localhost/getcountry.asmx?wsdl}&#8221; showBusyCursor=&#8221;true&#8221;&#62; &#60;mx:operation name=&#8221;getRGridStatus&#8221; resultFormat=&#8221;object&#8221; fault=&#8221;handleFault(event)&#8221; result=&#8221;handlegetRGridStatus(event)&#8221;&#62; &#60;mx:request xmlns=&#8221;"&#62; &#60;sHiddenId&#62;0&#60;/sHiddenId&#62; &#60;/mx:request&#62; &#60;/mx:operation&#62; &#60;/mx:WebService&#62; Result and fault events are common for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=113&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>&lt;mx:HTTPService result=&#8221;handleResult(event);&#8221; fault=&#8221;handleFault(event);&#8221; id=&#8221;hsService&#8221; resultFormat=&#8221;e4x&#8221;<br />
method=&#8221;POST&#8221;  url=&#8221;{Url Here}&#8221; useProxy=&#8221;false&#8221;&gt;</strong><br />
<strong> &lt;mx:request xmlns=&#8221;"&gt; </strong><br />
&lt;id&gt;{value}&lt;/id&gt;</p>
<div>&lt;sFileName&gt;{sFilename}&lt;/sFileName&gt;<br />
&lt;sFileType&gt;{sFiletype}&lt;/sFileType&gt;<br />
&lt;sTypeRes&gt;{sTypeRes}&lt;/sTypeRes&gt;<br />
<strong> &lt;/mx:request&gt;<br />
&lt;/mx:HTTPService&gt;</strong></p>
<p><strong>&lt;mx:RemoteObject id=&#8221;reomteobjectid&#8221; destination=&#8221;amfphp&#8221; endpoint=&#8221;<a href="http://localhost/amfphp/gateway.php" target="_blank">http://localhost/amfphp/gateway.php</a>?&#8221; source=&#8221;ProjectName.filename&#8221; &gt;</strong></p>
<p><strong> </strong></p>
<p>&lt;mx:method name=&#8221;userLogout&#8221; result=&#8221;<strong>handleResult</strong>(event)&#8221; fault=&#8221;<strong>handleFault</strong>(event)&#8221;&gt;<br />
&lt;mx:arguments&gt;<br />
&lt;username&gt;{userName}&lt;/username&gt;<br />
&lt;password&gt;{password}&lt;/password&gt;<br />
&lt;/mx:arguments&gt;<br />
&lt;/mx:method&gt;<br />
<strong><br />
&lt;/mx:RemoteObject&gt;</strong></p>
<p><strong>&lt;mx:WebService id=&#8221;webserviceid&#8221; wsdl=&#8221;{<a href="http://localhost/getcountry.asmx?wsdl" target="_blank">http://localhost/getcountry.asmx?wsdl</a>}&#8221; showBusyCursor=&#8221;true&#8221;&gt;<br />
&lt;mx:operation name=&#8221;getRGridStatus&#8221; resultFormat=&#8221;object&#8221;<br />
fault=&#8221;handleFault(event)&#8221; result=&#8221;handlegetRGridStatus(event)&#8221;&gt; </strong><br />
&lt;mx:request xmlns=&#8221;"&gt;<br />
&lt;sHiddenId&gt;0&lt;/sHiddenId&gt;<br />
&lt;/mx:request&gt;<br />
<strong> &lt;/mx:operation&gt;<br />
&lt;/mx:WebService&gt;</strong></p>
<p>Result and fault events are common for above three services.</p>
<p><strong>Differences :</strong></p>
<p>Http service :   url , httpserviceid.send()  here <strong>request</strong></p>
<p>Webservice  : webserviceid.opereationname(), here <strong>operation</strong></p>
<p>Remoteobject   : remoteid.methodname() ,here <strong>method</strong></p>
</div>
<div><strong><em>If any doubt, please post comment.</em><br />
</strong></div>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=113&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/03/02/comparsion-of-services-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>MultiLined Label for a Button</title>
		<link>http://sathishonflex.wordpress.com/2010/03/02/multilined-label-for-a-button/</link>
		<comments>http://sathishonflex.wordpress.com/2010/03/02/multilined-label-for-a-button/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 11:59:39 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=111</guid>
		<description><![CDATA[I found this task very tough when I started it. But Mr. Alex Hauri’s blog made me beleive that it is not that difficult. I published it mainly for my reference even though it is a kind of repition of that blog. I hope that this will definitely help someone. You can find Alex Hauri’s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=111&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I found this task very tough when I started it. But Mr. Alex Hauri’s blog made me beleive that it is not that difficult. I published it mainly for my reference even though it is a kind of repition of that blog. I hope that this will definitely help someone.</p>
<p>You can find Alex Hauri’s blog here <a href="http://blogs.adobe.com/aharui/">http://blogs.adobe.com/aharui/</a></p>
<p>This is how it is done. You need to create a customized button by extending the Button class. The button class overrides the createChildren method and creates a UI textfield to display the label.</p>
<p>These are somethings which you need to know before you start with the task</p>
<ol>
<li>Button uses an instance of UITextField to render its label, so we need to create an instance of UITextField for the label on our customized button.</li>
<li>Lable by default accommadates only a single line of text. In order to make it multiline, you need to override the createChildren() method of the Button class and give multiline and wordwrap behaviour to the instance of the textField and add it as a child of the button.</li>
</ol>
<p>Please find the <strong><em>createChildren()</em></strong> as below.</p>
<p><strong>override protected function createChildren():void<br />
{<br />
// Create a UITextField to display the label.<br />
if (!textField)<br />
{<br />
textField = new UITextField();<br />
textField.styleName = this;<br />
addChild(textField);<br />
}<br />
super.createChildren();<br />
textField.multiline = true;<br />
textField.wordwrap = true;<br />
}</strong></p>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=111&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/03/02/multilined-label-for-a-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>Printing DataGrid in Flex</title>
		<link>http://sathishonflex.wordpress.com/2010/03/02/printing-datagrid-in-flex/</link>
		<comments>http://sathishonflex.wordpress.com/2010/03/02/printing-datagrid-in-flex/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 11:58:19 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=109</guid>
		<description><![CDATA[I had to do a lot of research on printing a Flex datagrid in a decent way. There are very few resources on the web about printing in Flex. Adobe LiveDocs is an excellent online reference for Flex I thought of sharing my experience and the way I successfully printed the dataGrid in Flex See [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=109&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had to do a lot of research on printing a Flex datagrid in a decent way.<br />
There are very few resources on the web about printing in Flex. Adobe LiveDocs is an excellent online reference for Flex</p>
<p>I thought of sharing my experience and the way I successfully printed the dataGrid in Flex</p>
<p>See the below code before you start understanding how it works</p>
<p>——————————————————————————————-<br />
&lt;!– FileOne.mxml –&gt;<br />
public function printDataGrid() : void<br />
{</p>
<p>var printJob : FlexPrintJob = new FlexPrintJob();<br />
var thePrintView : FormPrintView = new FormPrintView();</p>
<p>Application.application.addChild(thePrintView);</p>
<p>if(printJob.start() != true)<br />
return;</p>
<p>//Set the print view properties.<br />
thePrintView.width=printJob.pageWidth;<br />
thePrintView.height=printJob.pageHeight;</p>
<p>thePrintView.printableDataGrid.dataProvider = originalDataGrid.dataProvider<br />
thePrintView.printableDataGrid.columns = originalDataGrid.columns ;<br />
thePrintView.printableDataGrid.setStyle(“fontSize”, 8);<br />
thePrintView.printableDataGrid.setStyle(“wordWrap”, true);</p>
<p>printJob.addObject(thePrintView);</p>
<p>printJob.send();</p>
<p>Application.application.removeChild(thePrintView);<br />
}</p>
<p>&lt;mx:DataGrid id=”originalDataGrid” width=”100%” height=”100%” dataProvider=”{dataForGrid}”/&gt;<br />
——————————————————————————————–</p>
<p>&lt;!– FormPrintView.mxml –&gt;</p>
<p>&lt;mx:VBox xmlns:mx=”http://www.adobe.com/2006/mxml”&gt;<br />
&lt;mx:PrintDataGrid id=”printableDataGrid” width=”90%” height=”100%”&gt;<br />
&lt;!– Specify the columns to ensure that their order is correct.<br />
This is not mandatory–&gt;</p>
<p>&lt;/mx:PrintDataGrid&gt;<br />
&lt;/mx:VBox&gt;</p>
<p>——————————————————————————————-</p>
<p>Below are the simple steps to print the DataGrid in Flex</p>
<p>1. Crete an instance of the FlexPrintJob called printJob (you can call anything you want to)</p>
<p>2. Crete an instance of the PrintDataGrid in another MXML file FormPrintView.mxml and create an instance of that – thePrintView<br />
(if you create&lt;mx:PrintDataGrid/&gt; in the same MXML, which uses the function –&gt; printDataGrid() then the application reservers some place for &lt;mx:PrintDataGrid/&gt; component.<br />
This looks a bit ugly as we do not want to see that extra space in our application)<br />
Always use PrintGrid class to print the dataGrid instead of the DataGrid, which originally displays content in the application, as it is tailored to print DataGrid in flex</p>
<p>3. Add the thePrintView object to the application container<br />
Application.application.addChild(thePrintView);</p>
<p>4. Only one print job can be active at a time. So check to see if the printJob.start() is true. Start printing when it is true</p>
<p>5. Set the height, width properties of the thePrintView object to the pageWidth and pageHeightof the pringJob object</p>
<p>6. Assign the dataProvider of the DataGrid to be printed to the instance of the PrintDataGrid class<br />
You also need to set the columns of the original dataGrid to the thePrintView object</p>
<p>You can also control the appearance of the printDataGrid object as follows<br />
printDataGrid.setStyle(“fontSize”, 8);<br />
printDataGrid.setStyle(“wordWrap”, true);</p>
<p>7. Use addObject method to add object to the printJob instance</p>
<p>8. Use printJob.send() to send the print job to a printer.</p>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=109&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/03/02/printing-datagrid-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>AutoSearch  or Auto Completion in Flex</title>
		<link>http://sathishonflex.wordpress.com/2010/03/02/autosearch-or-auto-completion-in-flex/</link>
		<comments>http://sathishonflex.wordpress.com/2010/03/02/autosearch-or-auto-completion-in-flex/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 11:57:04 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=107</guid>
		<description><![CDATA[It might be really easy to search a list if you implement this feature. This is how it is done I am assuming that you know how to implement the below mentioned function private var filteredListArray : Array; private function filterList(event:Event = null) : void { var txtLength:Number = txtInput.length;; var txtEntered:String = txtInput.text; filteredListArray [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=107&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It might be really easy to search a list if you implement this feature.<br />
This is how it is done</p>
<p>I am assuming that you know how to implement the below mentioned function</p>
<p>private var filteredListArray : Array;</p>
<p>private function filterList(event:Event = null) : void<br />
{<br />
var txtLength:Number = txtInput.length;;<br />
var txtEntered:String = txtInput.text;<br />
filteredListArray = new Array();</p>
<p>if(txtInput.text == “”)<br />
{<br />
listId.dataProvider = dataProvider;<br />
return;<br />
}</p>
<p>else<br />
{<br />
for(var i : int = 0 ; i &lt; dataProvider.length; i++)<br />
{<br />
if(dataProvider[i].toString().substring(0, txtLength).toLowerCase() == txtEntered.toLowerCase())<br />
{<br />
filteredListArray.push(dataProvider[i]);<br />
}<br />
listId.dataProvider = filteredListArray;<br />
}<br />
}</p>
<p>}</p>
<p>&lt;mx:TextInput id=”txtInput” change=”filterList(event)”/&gt;<br />
&lt;mx:List id=”listId” dataProvider=”{dataProvider}”/&gt;</p>
<p>TextInput calls filterList(event) every time user inputs something in the text input box<br />
filterList(event) method carries out all the necessary functionality</p>
<p>The catch is the way we assign the proper data provider to the List component</p>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=107&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/03/02/autosearch-or-auto-completion-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>Shared Objects in Flex and ActionScript 3.0</title>
		<link>http://sathishonflex.wordpress.com/2010/03/02/shared-objects-in-flex-and-actionscript-3-0/</link>
		<comments>http://sathishonflex.wordpress.com/2010/03/02/shared-objects-in-flex-and-actionscript-3-0/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 11:55:17 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=104</guid>
		<description><![CDATA[Shared Objects are used to store data outside of the Flash Player There are two types of Shared Objects 1. Local shared objects – LSOs 2. Remote shared objects – RSOs LSO is similar to browser cookies But what are cookies..Cookies have got the ability to remember the user information so that the user doesnt [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=104&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Shared Objects are used to store data outside of the Flash Player</p>
<p>There are two types of <strong>Shared Objects</strong><br />
1. Local shared objects – LSOs<br />
2. Remote shared objects – RSOs</p>
<p>LSO is similar to browser cookies</p>
<p>But what are cookies..Cookies have got the ability to remember the user information so that the user doesnt have to manually login during each visit..</p>
<p><strong>LSO Vs Cookies</strong></p>
<p>LSOs are can store more data than cookies<br />
LSOs never expire<br />
LSOs arent transmitted between the client and the server<br />
LSOs can store native ActionScript datatypes.</p>
<p>Uh!! Cool isnt it??</p>
<p><strong>LSOs are to Flash (Call it Flash cookies)</strong><br />
Cookies are to web browsers</p>
<blockquote><p>LSO files are saved to the client computer in a binary file ending with a .sol extension<br />
Flash movies with in the same domain can read from or write to the .sol files by means of ActionScript’s flash.net.SharedObjects</p>
<p>The static getLocal() method is the mechanism by which LSOs are both created and opened for reading</p>
<p>var example : SharedObject = SharedObject.getLocal(“example”);</p>
<p><em><strong>Remote Sharing Objects</strong></em></p>
<blockquote><p>RSOs are created using the static getRemote function. This returns a reference to an object that can be shared across multiple clients by means of a server, such as Flash Media Server. If the shared object does not already exist, this method creates one.</p>
<p>The following code shows how you assign the returned shared object reference to a variable:</p>
<p>var myRemote_so:SharedObject = SharedObject.getRemote(name, remotePath, persistence);</p>
<p>To create a shared object that is available only to the current client, use SharedObject.getLocal().</p>
<p>After calling this method, use SharedObject.connect() to connect the object to the application server, as shown in the following code:</p>
<p>var myNC:NetConnection = new NetConnection();<br />
myNC.connect(“rtmp://[yourDomain].com/applicationName”);<br />
var myRemoteSO:SharedObject = SharedObject.getRemote(“mo”, myNC.uri, false);<br />
myRemoteSO.connect(myNC);</p>
<p>To confirm that the local and remote copies of the shared object are synchronized, use the sync event.</p>
<p>All clients that want to share this object must pass the same values for the name and remotePath parameters.</p></blockquote>
</blockquote>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=104&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/03/02/shared-objects-in-flex-and-actionscript-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>An internal build error has occurred. Right-click for more information</title>
		<link>http://sathishonflex.wordpress.com/2010/03/02/an-internal-build-error-has-occurred-right-click-for-more-information/</link>
		<comments>http://sathishonflex.wordpress.com/2010/03/02/an-internal-build-error-has-occurred-right-click-for-more-information/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 11:53:33 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=102</guid>
		<description><![CDATA[Error: An internal build error has occurred. Right-click for more information I struggled finding the solution for this error. But you couldn’t guess!!  the solution is very simple Search for a switch statement without any cases. For example: switch(value) { //No cases } Remove that and recompile the application. I hope this is useful to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=102&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<div>
<p><strong>Error: An internal build error has occurred. Right-click for more information</strong></p>
<p>I struggled finding the solution for this error. But you couldn’t guess!!  the solution is very simple</p>
<p>Search for a switch statement without any cases. For example:</p>
<p>switch(value)<br />
{<br />
//No cases</p>
<p>}</p>
<p>Remove that and recompile the application.<br />
I hope this is useful to you all.</p>
</div>
</div>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=102&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/03/02/an-internal-build-error-has-occurred-right-click-for-more-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>Peer to Peer (P2P) in Flash Player 10 beta</title>
		<link>http://sathishonflex.wordpress.com/2010/03/02/peer-to-peer-p2p-in-flash-player-10-beta/</link>
		<comments>http://sathishonflex.wordpress.com/2010/03/02/peer-to-peer-p2p-in-flash-player-10-beta/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 03:32:18 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/2010/03/02/peer-to-peer-p2p-in-flash-player-10-beta/</guid>
		<description><![CDATA[There has been a lot of great excitement around RTMFP (Real Time Media Flow Protocol), especially because of the peer to peer (P2P) communication that is enabled in Flash Player 10 beta. This is a natural time to speculate about what cool applications you will build with new technology, so I’d like to give you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=100&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of great excitement around RTMFP (Real Time Media Flow Protocol), especially because of the peer to peer (P2P) communication that is enabled in Flash Player 10 beta. This is a natural time to speculate about what cool applications you will build with new technology, so I’d like to give you some more information for you to work with.</p>
<p>Since I have been frequently been asked about details on this, a frequently asked questions format somehow seemed appropriate <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  . For those that want to start working with RTMFP, make sure to read to the end, there is a goody for you!</p>
<p>Does Flash Player 10 beta support Peer to Peer (P2P) communication?<br />
Flash Player 10 beta has new methods on the NetConnection and NetStream objects that allow communication through peer connections that are managed by a future Adobe server technology. The server will maintain a list of potential peers that can be connected to. If the NetConnection to the server is lost or closed, any peer connection that was initiated through the same NetConnection will also be closed.</p>
<p>How will I make a P2P connection through Flash Player 10 beta?<br />
Connections from a SWF through a future Adobe server release will be assigned a temporary unique ID that is infeasible to guess or forge. Other SWFs connected to the same server can subscribe to the streams and events from that ID once the broadcasting SWF agrees to the connection.</p>
<p>On the server level, these IDs can be mapped to application-specific information such as presence. For a chat application, the ID can be linked to the nickname the user gave when connecting to the application. While the end-user may select the person that they want to chat with, Flash Player will use the ID to establish the connection with that user.</p>
<p>What can I send through the P2P connection?<br />
In a similar way that you would stream local microphone and webcam media up to a server, you will also be able to stream it directly to another Flash Player client that has connected as a peer.</p>
<p>Through NetStream.send you can also send data which is useful for shared experiences in real-time applications. Any data format can be sent through this method though there are size limitations to the packet which may make certain data types less useful.</p>
<p>How does the peer connection work?<br />
RTMFP UDP packets are sent directly from one Flash Player to another. The server translates the peer IDs to network addresses, and also assists in setting up the connection if one or both ends is behind a Network Address Translation (NAT) device. If UDP is blocked by a firewall or if RTMFP is blocked through a configuration of mms.cfg, the peer connection will not go through.</p>
<p>Can I choose between UDP and TCP?<br />
No, RTMFP is a UDP-based protocol while RTMP is a TCP-based protocol. You will automatically use UDP by calling the methods that work over RTMFP.</p>
<p>Will RTMFP enable massive file-sharing applications through Flash Player 10 beta?<br />
No. Large-scale file-sharing network applications rely on the ability to read from and write to the hard drive constantly to only load parts of files into memory when needed. In Flash Player 10 beta you can load files from the desktop to the Flash Player runtime, but the file would need to be loaded manually by the end-user and remain in memory for the entire time the file would be needed. The drain on system resources would make this style of application impractical.</p>
<p>Can I get started with RTMFP now?<br />
While the support for RTMFP is built in to Flash Player 10 beta, there is no publicly available server technology to manage the connection process. If you would like to be considered for access to private beta programs around RTMFP, please send an email to fmsprerelease@adobe.com</p>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=100&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/03/02/peer-to-peer-p2p-in-flash-player-10-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>The Flex Application Frameworks SmackDown (sorta)</title>
		<link>http://sathishonflex.wordpress.com/2010/02/20/the-flex-application-frameworks-smackdown-sorta/</link>
		<comments>http://sathishonflex.wordpress.com/2010/02/20/the-flex-application-frameworks-smackdown-sorta/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 12:14:29 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=90</guid>
		<description><![CDATA[The Selecting the Right Flex Application Framework post provided a summary comparison of the Flex application frameworks out there, highlighting the ones I thought were the “heavyweights” a Flex developer should focus on. The purpose was primarily to help you make a quick, easy, but well-informed decision, without looking at the code. But many of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=90&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a title="Selecting the Right Flex Application Framework" href="http://www.summa-tech.com/blog/2009/01/14/selecting-the-right-flex-application-framework/" target="_blank">Selecting the Right Flex Application Framework</a> post provided a summary comparison of the Flex application frameworks out there, highlighting the ones I thought were the “heavyweights” a Flex developer should focus on. The purpose was primarily to help you make a quick, easy, but well-informed decision, without looking at the code.</p>
<p>But many of us wish to look under the covers and see a detailed comparison of the frameworks. So I took <a title="Creating a Simple RIA" href="http://learn.adobe.com/wiki/display/Flex/Part+I.+Creating+a+Simple+RIA" target="_blank">Adobe’s Flex Builder 3 Getting Started tutorial example</a> of a simple Flickr photo search and re-implemented it in <a title="Cairngorm" href="http://opensource.adobe.com/wiki/display/cairngorm/" target="_blank">Cairngorm</a>, <a title="PureMVC" href="http://puremvc.org/" target="_blank">PureMVC</a> and <a title="Mate" href="http://mate.asfusion.com/" target="_blank">Mate</a>.</p>
<h3>No Framework</h3>
<p>But before we discuss each framework, let’s quickly go over the problems that the frameworks are trying to solve. All Flex application frameworks have been created, because there are problems with implementing a Flex application without one (or, of course, with another framework).</p>
<p>If you take a look at the <a title="Code Files" href="http://learn.adobe.com/wiki/display/Flex/1b.+Code+Files" target="_blank">Code Files</a> in the tutorial, you’ll see that the application doesn’t really need a framework, because it’s simple and straightforward. However, oftentimes, applications are just the opposite. So implementing a complex Flex application, without a framework and following the model described in the tutorial, will require the following:</p>
<ul>
<li><strong>Separation of Concerns. </strong>Of course, the major rationale for using the framework is to separate the code based on its roles/responsibilities, i.e. model, view, controller. The advantages of which I won’t discuss further. Read Wikipedia. In any case, without a framework, the data, the business logic and the interface are mixed inside the FlickrRIA application.</li>
<li><strong>Data Sharing. </strong>Data, e.g. the photoFeed, needs to be shared to other screens in the application. It will not be best practice to expose the variables in different pages for other pages to access. Think spaghetti, but not for eating.</li>
<li><strong>Service Sharing. </strong>The HTTP Service and the like, e.g. the photoService, needs to be reused in other functions of the application, as well as the logic for using that service, e.g. the requestPhotos() method. Similar dilemma as with data sharing.</li>
<li><strong>Unit Testing. </strong>Testing must be easy to do. Automation is highly recommended. It can still be done without a framework, but it is difficult with the logic embedded in the Flex components.</li>
</ul>
<h3>Cairngorm</h3>
<p>For all 3 frameworks, the development process starts with implementing the Photo value object. Beyond that, the frameworks differ.</p>
<p><a href="http://www.summa-tech.com/blog/wp-content/uploads/2009/02/summa_flex_cairngorm.zip">Flickr Example Using Cairnorm (Flex project archive, ZIP)</a></p>
<p><a title="Cairngorm" href="http://opensource.adobe.com/wiki/display/cairngorm/" target="_blank">Cairngorm</a> addresses the difficulties in the absence of a framework with recommended best practices and the framework. Ease of testing and maintenance are derived from the separation of concerns.</p>
<ul>
<li><strong>Model. </strong>Data is encapsulated and shared via the singleton ModelLocator, and is bound to the Flex components of the application.</li>
<li><strong>View. </strong>The View is made up of different visual Flex components in the application. It has two jobs:  1) dispatching events to request data or invoke actions on the backend and 2) watching for Model updates and updating the interface as needed.</li>
<li><strong>Controller. </strong>The Controller is implemented via the FrontController. It manages which command is invoked when an event is dispatched from the View.
<ul>
<li>Business logic is encapsulated and spread out in Commands. It invokes the service (via delegates), handles the results, and updates the Model.</li>
<li>Delegates add an extra layer of indirection between the application (client) and the server. They locate the service, invoke it and pass the necessary parameters.</li>
<li>Services are encapsulated and shared via the singleton ServiceLocator.</li>
</ul>
</li>
</ul>
<p>I found <a title="Cairngorm" href="http://opensource.adobe.com/wiki/display/cairngorm/" target="_blank">Cairngorm</a> really easy to learn and work with. With its wide support and defacto standard status, it almost always is the chosen framework. It’s good for medium to large development teams of varying skill levels in Flex and ActionScript.</p>
<p>However, there are a few disadvantages with <a title="Cairngorm" href="http://opensource.adobe.com/wiki/display/cairngorm/" target="_blank">Cairngorm</a>.</p>
<ul>
<li>The ModelLocator can get huge and unwieldy; depending on how large your application is and how much data it keeps. To resolve this, I have seen using more than one ModelLocator to separate, say, the business data from the presentation data. But it still won’t be fun to handle merge conflicts with everyone updating it, if you’re in a large team.</li>
<li>Extending the CairngormEvent for each event to encapsulate the event name ID and data was not too pleasant. I would imagine it’s easy to end up with duplicate event IDs in a large application (which is why a naming convention would be vital). I suppose you can create a generic Cairngorm event, but the data parameters wouldn’t be type-checked.</li>
<li>Lastly, I wasn’t in favor of referencing the ModelLocator in all of my Flex components. I favored passing a data reference from a parent component to keep my view components as reusable and un-Cairngorm-ish as possible.</li>
</ul>
<h3>PureMVC</h3>
<p><a href="http://www.summa-tech.com/blog/wp-content/uploads/2009/02/summa_flex_puremvc.zip">Flickr Example Using PureMVC (Flex project archive, ZIP)</a></p>
<p><a title="PureMVC" href="http://puremvc.org/" target="_blank">PureMVC</a> addresses the difficulties similar to Cairngorm with a few more layers of indirection.</p>
<ul>
<li><strong>Model. </strong>Data is encapsulated and spread out in Proxies. These are referenced singletons. The Model handles interaction to the data access layer in persisting or retrieving data. In the code, I used the Proxy and Delegate pattern. No huge model locators found here!</li>
<li><strong>View. </strong>The View is implemented with Flex components and Mediators. The mediators run interference between the view components and the rest of the application. The View listens to events, sends notifications to request data or invoke an action, and receives notifications to update the visual components. The view components do not have any PureMVC-specific code and are reusable.
<ul>
<li>Note that events do not need to be customized. The mediator retrieves the necessary data from the view component and passes it to the command.</li>
<li>Events are, in effect, replaced by notifications — similar to a Flex event. Of course, there is no type-checking for the parameters.</li>
</ul>
</li>
<li><strong>Controller. </strong>The Controller is hidden from the developer, but maintained the mappings between notifications and commands.
<ul>
<li>Commands, like in Cairngorm, contain the business logic. But for data persistence and/or retrieval, they defer to the Proxies.</li>
<li>Unique to PureMVC is the Façade. It is a singleton that initializes the Model, View and Controller components. All components can be accessed through the façade, as well as all notification and/or event IDs.</li>
</ul>
</li>
</ul>
<p><a title="PureMVC" href="http://puremvc.org/" target="_blank">PureMVC</a> resolves a lot of the aspects I didn’t like about Cairngorm. It is good for complex applications, with a lot of common components, e.g. forms-based applications with workflows. And it works well for medium to large development teams.</p>
<p>However, it does have a few disadvantages:</p>
<ul>
<li>PureMVC cannot rely on data binding innately. Manually updating the data on the view from the mediator could get annoying in a larger application. I suppose that is the “sacrifice” that must be made in making the view components purely portable, without any knowledge of PureMVC. However, because of this, I began to question, how often do I need it to be portable? Apart from this exercise?</li>
<li>It’s more complex than other frameworks. Therefore, it does incur a steeper learning curve than others. It may not be too difficult for a developer who knows Java, for example. But complexity and flexibility can breed more architectural mistakes.</li>
</ul>
<h3>Mate</h3>
<p><a href="http://www.summa-tech.com/blog/wp-content/uploads/2009/02/summa_flex_mate.zip">Flickr Example Using Mate (Flex project archive, ZIP)</a></p>
<p><a title="Mate" href="http://mate.asfusion.com/" target="_blank">Mate</a> responds to the challenges of having no Flex application framework in a simple, “indirect” way. It is a “tag-based, event-driven Flex framework”, but can facilitate an MVC implementation.</p>
<ul>
<li><strong>Model. </strong>Mate doesn’t provide specific model components, but enables the data sharing and encapsulation with the use of cached generators. In examples, they call these managers.</li>
<li><strong>View. </strong>The View is implemented with Flex components, which handle event dispatching for data retrieval and/or method invocation. Similar to PureMVC, the view components are highly reusable, since they don’t have knowledge of Mate.</li>
<li><strong>Controller. </strong>The Controller is configured via the event map, the core of Mate.
<ul>
<li>Event handlers are defined in the map to specify what needs to happen when certain events are dispatched. It can support a variety of handlers, such as HTTP service invokers, web service invokers, command invokers and method invokers. In combination, these comprise the business logic triggered by the dispatched event.</li>
<li>Instead of binding view properties directly to the Model, Mate uses injectors. Injectors are also defined in the event map to set properties from a source (in the Model) to a target (in the View). Similar to event handlers, injectors observe changes from the Model to trigger updating the View.</li>
</ul>
</li>
</ul>
<p><a title="Mate" href="http://mate.asfusion.com/" target="_blank">Mate</a> also resolves a lot of my issues with Cairngorm, but is simpler overall than PureMVC. It is still unable to take advantage of data binding, but I prefer injectors to setting data through code.</p>
<p>Mate would work well for complex applications and is suited for small to large development teams. And unlike other IoC Flex frameworks, it provides more meat behind the event handlers.</p>
<p><strong>Note: </strong>The embedded code files have comments that contain more details about each ActionScript class/component. It explains what needs to be created/updated for new functionality and what are the base objects. I have also included a “simplistic” sequence diagram (well, I tried as best I could to make it simple) of the event flows for each framework, when a photo search is performed.</p>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=90&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/02/20/the-flex-application-frameworks-smackdown-sorta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>Validating Flex forms using the Validator classes</title>
		<link>http://sathishonflex.wordpress.com/2010/02/11/validating-flex-forms-using-the-validator-classes/</link>
		<comments>http://sathishonflex.wordpress.com/2010/02/11/validating-flex-forms-using-the-validator-classes/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 14:01:02 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=85</guid>
		<description><![CDATA[&#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" creationComplete="init();"&#62;   &#60;mx:Script&#62; &#60;![CDATA[ import mx.validators.Validator; import mx.events.ValidationResultEvent; import mx.validators.ZipCodeValidatorDomainType; import mx.controls.Alert;   [Bindable] private var validatorArr:Array;   private function init():void { validatorArr = new Array(); validatorArr.push(shippingName_stringValidator); validatorArr.push(shippingAddress1_stringValidator); validatorArr.push(shippingCity_stringValidator); validatorArr.push(shippingState_numberValidator); validatorArr.push(shippingZipCode_zipCodeValidator); validatorArr.push(shippingZipCode_stringValidator); }   private function validateForm(evt:MouseEvent):void { var validatorErrorArray:Array = Validator.validateAll(validatorArr);; var isValidForm:Boolean [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=85&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<div>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="vertical"
    verticalAlign="middle"
    backgroundColor="white"
    creationComplete="init();"&gt;
 
    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.validators.Validator;
            import mx.events.ValidationResultEvent;
            import mx.validators.ZipCodeValidatorDomainType;
            import mx.controls.Alert;
 
            [Bindable]
            private var validatorArr:Array;
 
            private function init():void {
                validatorArr = new Array();
                validatorArr.push(shippingName_stringValidator);
                validatorArr.push(shippingAddress1_stringValidator);
                validatorArr.push(shippingCity_stringValidator);
                validatorArr.push(shippingState_numberValidator);
                validatorArr.push(shippingZipCode_zipCodeValidator);
                validatorArr.push(shippingZipCode_stringValidator);
            }
 
            private function validateForm(evt:MouseEvent):void {
                var validatorErrorArray:Array = Validator.validateAll(validatorArr);;
                var isValidForm:Boolean = validatorErrorArray.length == 0;
                if (isValidForm) {
                    Alert.show("The form is valid!", "Valid form...");
                } else {
                    var err:ValidationResultEvent;
                    var errorMessageArray:Array = [];
                    for each (err in validatorErrorArray) {
                        var errField:String = FormItem(err.currentTarget.source.parent).label
                        errorMessageArray.push(errField + ": " + err.message);
                    }
                    Alert.show(errorMessageArray.join("\n\n"), "Invalid form...", Alert.OK);
                }
            }
 
            private function resetForm(evt:MouseEvent):void {
                shippingName.text = "";
                shippingAddress1.text = "";
                shippingAddress2.text = "";
                shippingCity.text = "";
                shippingState.selectedIndex = -1;
                shippingZipCode.text = "";
            }
        ]]&gt;
    &lt;/mx:Script&gt;
 
    &lt;mx:XMLList id="statesXMLList"&gt;
        &lt;state label="California" data="CA" /&gt;
        &lt;state label="Oregon" data="OR" /&gt;
    &lt;/mx:XMLList&gt;
 
    &lt;mx:StringValidator id="shippingName_stringValidator"
        source="{shippingName}"
        property="text"
        minLength="2" /&gt;
 
    &lt;mx:StringValidator id="shippingAddress1_stringValidator"
        source="{shippingAddress1}"
        property="text"
        minLength="2" /&gt;
 
    &lt;mx:StringValidator id="shippingCity_stringValidator"
        source="{shippingCity}"
        property="text"
        minLength="2" /&gt;
 
    &lt;mx:NumberValidator id="shippingState_numberValidator"
        source="{shippingState}"
        lowerThanMinError="This field is required."
        property="selectedIndex"
        minValue="0" /&gt;
 
    &lt;mx:ZipCodeValidator id="shippingZipCode_zipCodeValidator"
        source="{shippingZipCode}"
        property="text"
        requiredFieldError="Please enter a zip code in ZIP+4 format."
        domain="{ZipCodeValidatorDomainType.US_ONLY}"  /&gt;
 
    &lt;mx:StringValidator id="shippingZipCode_stringValidator"
        source="{shippingZipCode}"
        property="text"
         tooShortError="Please enter a zip code in ZIP+4 format."
        minLength="10" maxLength="10" /&gt;
 
    &lt;mx:Form&gt;
        &lt;mx:FormHeading label="Shipping Information" /&gt;
        &lt;mx:FormItem required="true" label="Name"&gt;
            &lt;mx:TextInput id="shippingName" maxChars="96" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem required="true" label="Address"&gt;
            &lt;mx:TextInput id="shippingAddress1" maxChars="128" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label=""&gt;
            &lt;mx:TextInput id="shippingAddress2" maxChars="128" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem required="true" label="City"&gt;
            &lt;mx:TextInput id="shippingCity" maxChars="128" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem required="true" label="State"&gt;
            &lt;mx:ComboBox id="shippingState" prompt="Please select a State..." selectedIndex="-1" dataProvider="{statesXMLList}" labelField="@label" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem required="true" label="ZIP Code"&gt;
            &lt;mx:TextInput id="shippingZipCode" maxChars="10" restrict="0-9 \-" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem&gt;
            &lt;mx:HBox&gt;
                &lt;mx:Button label="Submit" click="validateForm(event)" /&gt;
                &lt;mx:Button label="Reset" click="resetForm(event)" /&gt;
            &lt;/mx:HBox&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;
 
&lt;/mx:Application&gt;</pre>
</div>
</div>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=85&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/02/11/validating-flex-forms-using-the-validator-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
		<item>
		<title>ArrayCollection with multiple filter functions</title>
		<link>http://sathishonflex.wordpress.com/2010/02/11/arraycollection-with-multiple-filter-functions/</link>
		<comments>http://sathishonflex.wordpress.com/2010/02/11/arraycollection-with-multiple-filter-functions/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 11:36:49 +0000</pubDate>
		<dc:creator>sathishonflex</dc:creator>
				<category><![CDATA[Flex Air]]></category>

		<guid isPermaLink="false">http://sathishonflex.wordpress.com/?p=82</guid>
		<description><![CDATA[Lately I have been working a lot with complex forms and data filters. If you have some four or five forms, each affecting the same data collection and each having between 5 and 10 filter criteria, you&#8217;ll start feeling you&#8217;re no longer in control of your situation. The ArrayCollection class has a built-in filtering mechanism, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=82&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lately I have been working a lot with complex forms and data filters. If you have some four or five forms, each affecting the same data collection and each having between 5 and 10 filter criteria, you&#8217;ll start feeling you&#8217;re no longer in control of your situation.</p>
<p>The <code>ArrayCollection </code> class has a built-in filtering mechanism, where you pass a function reference to the <code>filterFunction</code> property in order to filter out the items that don&#8217;t satisfy the function&#8217;s criteria. This is extremely useful, but if you need to filter on more than one criterion you&#8217;ll have to complicate the filter function more and more. I don&#8217;t know why, but It gives me the same chills on my spine as hardcoding does.</p>
<p>The solution was to extend the <code>ArrayCollection </code> and add the option to provide an array of function references as filters. The final result is the AND between each evaluated filter function. It&#8217;s one of those situations when writing some few extra lines of code really pays off.</p>
<p>Example:</p>
<p>Action script file -</p>
<pre>package
{

import mx.collections.ArrayCollection;

public class ArrayCollectionComplex extends ArrayCollection
{
	private var _filterFunctions:Array;

	public function ArrayCollectionComplex( source:Array = null )
	{
		super(source);
	}
	public function set filterFunctions( filtersArray:Array ):void
	{
		_filterFunctions = filtersArray;
		this.filterFunction = complexFilter;
	}
	public function get filterFunctions():Array
	{
		return _filterFunctions;
	}

	protected function complexFilter( item:Object ):Boolean
	{
		var filterFlag:Boolean = true;
		var filter:Function;
		for each(filter in filterFunctions)
		{
			filterFlag = filter( item );
			if( !filterFlag )
				break;
		}
		return filterFlag;
	}
}

}

mxml file
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    creationComplete="creationCompleteHandler();" xmlns:local="*"&gt;
&lt;mx:Script&gt;
    &lt;![CDATA[

        private var selectedMinPrice:int = 0;
        private var selectedMaxPrice:int = 3000;
        private var selectedType:String = "all";
        private var selectedCondition:String = "all";
        private var selectedVendor:String = "all";

        private function creationCompleteHandler():void
        {
            /* setup the filters array: in order to take effect
             * you must call refresh() on the collection
             */
            productsCollection.filterFunctions =
                [
                    filterByPrice, filterByType,
                    filterByCondition, filterByVendor
                ]
            productsCollection.refresh();
        }

        // your classic filter functions
        private function filterByPrice( item:Object ):Boolean
        {
            if( selectedMinPrice &lt;= item.productPrice &amp;&amp; selectedMaxPrice &gt; item.productPrice )
                return true;
            return false;
        }

        private function filterByType( item:Object ):Boolean
        {
            if( item.productType == selectedType || selectedType == "all" )
                return true;
            return false;
        }

        private function filterByCondition( item:Object ):Boolean
        {
            if( item.productCondition == selectedCondition || selectedCondition == "all" )
                return true;
            return false;
        }

        private function filterByVendor( item:Object ):Boolean
        {
            if( item.productVendor == selectedVendor || selectedVendor == "all" )
                return true;
            return false;
        }

        // change handlers, nothing new here
        private function productPriceChangeHandler():void
        {
            selectedMinPrice = hsProductPrice.values[0];
            selectedMaxPrice = hsProductPrice.values[1];
            productsCollection.refresh();
        }

        private function productTypeChangeHandler():void
        {
            if( cbProductType.selectedItem != null )
                selectedType = cbProductType.selectedItem.data;
            productsCollection.refresh();
        }

        private function productConditionChangeHandler():void
        {
            if( cbProductCondition.selectedItem != null )
                selectedCondition = cbProductCondition.selectedItem.data;
            productsCollection.refresh();
        }

        private function productVendorChangeHandler():void
        {
            if( cbProductVendor.selectedItem != null )
                selectedVendor = cbProductVendor.selectedItem.data;
            productsCollection.refresh();
        }
    ]]&gt;
&lt;/mx:Script&gt;
    &lt;mx:DataGrid horizontalCenter="0" height="250" y="89"&gt;

        &lt;mx:dataProvider&gt;
            &lt;local:ArrayCollectionComplex id="productsCollection"&gt;
                &lt;mx:Array&gt;
                    &lt;mx:Object productName="Solar Panel" productPrice="1500" productType="home" productCondition="new" productVendor="SunPan" /&gt;
                    &lt;mx:Object productName="Laptop Battery" productPrice="80" productType="computers" productCondition="used" productVendor="Laptop INC." /&gt;
                    &lt;mx:Object productName="Laptop Screen" productPrice="300" productType="computers" productCondition="new" productVendor="Laptop INC." /&gt;
                    &lt;mx:Object productName="Temp. Monitor" productPrice="95" productType="home" productCondition="new" productVendor="YourHome LTD" /&gt;
                    &lt;mx:Object productName="Motion Sensor" productPrice="2500" productType="home" productCondition="new" productVendor="Secu-Dome" /&gt;
                    &lt;mx:Object productName="Brake Disk" productPrice="200" productType="auto" productCondition="used" productVendor="Voltran" /&gt;
                    &lt;mx:Object productName="Safety Belt" productPrice="500" productType="auto" productCondition="new" productVendor="PanAuto West" /&gt;
                    &lt;mx:Object productName="Multimeter" productPrice="40" productType="electro" productCondition="new" productVendor="VOID" /&gt;
                    &lt;mx:Object productName="Capacitor" productPrice="5" productType="electro" productCondition="new" productVendor="VOID" /&gt;
                &lt;/mx:Array&gt;
            &lt;/local:ArrayCollectionComplex&gt;
        &lt;/mx:dataProvider&gt;        

        &lt;mx:columns&gt;
            &lt;mx:DataGridColumn dataField="productName" headerText="Name" /&gt;
            &lt;mx:DataGridColumn dataField="productPrice" headerText="Price" /&gt;
            &lt;mx:DataGridColumn dataField="productType" headerText="Type" /&gt;
            &lt;mx:DataGridColumn dataField="productCondition" headerText="Condition" /&gt;
            &lt;mx:DataGridColumn dataField="productVendor" headerText="Vendor" /&gt;
        &lt;/mx:columns&gt;

    &lt;/mx:DataGrid&gt;
    &lt;mx:HBox y="365" width="700" horizontalCenter="0" horizontalAlign="center" verticalAlign="middle"&gt;
        &lt;mx:HSlider id="hsProductPrice" allowTrackClick="true" minimum="0" maximum="3000" snapInterval="10" liveDragging="true" thumbCount="2" toolTip="Price" width="220"
            change="productPriceChangeHandler()" values="[0,3000]" labels="[0, 3000]"/&gt;

        &lt;mx:ComboBox id="cbProductType" change="productTypeChangeHandler();"&gt;
            &lt;mx:dataProvider&gt;
                &lt;mx:Array&gt;
                    &lt;mx:Object label="-- All Types --" data="all" /&gt;
                    &lt;mx:Object label="home" data="home" /&gt;
                    &lt;mx:Object label="computers" data="computers" /&gt;
                    &lt;mx:Object label="auto" data="auto" /&gt;
                    &lt;mx:Object label="electro" data="electro" /&gt;
                &lt;/mx:Array&gt;
            &lt;/mx:dataProvider&gt;
        &lt;/mx:ComboBox&gt;

        &lt;mx:ComboBox id="cbProductCondition" change="productConditionChangeHandler();"&gt;
            &lt;mx:dataProvider&gt;
                &lt;mx:Array&gt;
                    &lt;mx:Object label="-- All Conditions --" data="all" /&gt;
                    &lt;mx:Object label="new" data="new" /&gt;
                    &lt;mx:Object label="used" data="used" /&gt;
                &lt;/mx:Array&gt;
            &lt;/mx:dataProvider&gt;
        &lt;/mx:ComboBox&gt;
        &lt;mx:ComboBox id="cbProductVendor" change="productVendorChangeHandler();"&gt;
            &lt;mx:dataProvider&gt;
                &lt;mx:Array&gt;
                    &lt;mx:Object label="-- All Vendors --" data="all" /&gt;
                    &lt;mx:Object label="SunPan" data="SunPan" /&gt;
                    &lt;mx:Object label="Laptop INC." data="Laptop INC." /&gt;
                    &lt;mx:Object label="YourHome LTD" data="YourHome LTD" /&gt;
                    &lt;mx:Object label="Secu-Dome" data="Secu-Dome" /&gt;
                    &lt;mx:Object label="Voltran" data="Voltran" /&gt;
                    &lt;mx:Object label="PanAuto West" data="PanAuto West" /&gt;
                    &lt;mx:Object label="VOID" data="VOID" /&gt;
                &lt;/mx:Array&gt;
            &lt;/mx:dataProvider&gt;
        &lt;/mx:ComboBox&gt;
    &lt;/mx:HBox&gt;
&lt;/mx:Application&gt;</pre>
</pre>
<br />Filed under: <a href='http://sathishonflex.wordpress.com/category/flex-air/'>Flex Air</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sathishonflex.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sathishonflex.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sathishonflex.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sathishonflex.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sathishonflex.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sathishonflex.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sathishonflex.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sathishonflex.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sathishonflex.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sathishonflex.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sathishonflex.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sathishonflex.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sathishonflex.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sathishonflex.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sathishonflex.wordpress.com&amp;blog=10696151&amp;post=82&amp;subd=sathishonflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sathishonflex.wordpress.com/2010/02/11/arraycollection-with-multiple-filter-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a27c575627dc0974faf4a8ba59e53ac?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sathishonflex</media:title>
		</media:content>
	</item>
	</channel>
</rss>
