<?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>Flex Examples &#187; requiresSelection</title>
	<atom:link href="http://blog.flexexamples.com/tag/requiresselection/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Checking that an item is selected in the Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 00:49:23 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[NumberValidator]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[lowerThanMinError]]></category>
		<category><![CDATA[requiresSelection]]></category>
		<category><![CDATA[selectedIndex]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2597</guid>
		<description><![CDATA[<p>The following example shows how you can check whether the user has selected an item in the Spark DropDownList control in Flex 4 by setting the Boolean requiresSelection property to true or using a NumberValidator to check the DropDownList control&#8217;s selectedIndex property is greater than -1.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_requiresSelection_test&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can check whether the user has selected an item in the Spark DropDownList control in Flex 4 by setting the Boolean <code>requiresSelection</code> property to <em>true</em> or using a NumberValidator to check the DropDownList control&#8217;s <code>selectedIndex</code> property is greater than -1.</p>
<p><span id="more-2597"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span> 
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_requiresSelection_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span> 
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;ddl&quot;</span> prompt=<span style="color: #ff0000;">&quot;Please select an item&quot;</span> requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ArrayList</span> source=<span style="color: #ff0000;">&quot;[one,two,three,four,five,six,seven]&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:DropDownList</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_requiresSelection_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_requiresSelection_test/main.html" width="100%" height="300"></iframe></p>
<p>Or you can use a NumberValidator on the Spark DropDownList control to check that the <code>selectedIndex</code> property is greater than or equal to 0, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_selectedIndex_NumberValidator_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span> 
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            import mx.controls.Alert;</span>
<span style="color: #000000;">            import mx.events.ValidationResultEvent;</span>
&nbsp;
<span style="color: #000000;">            protected function button1_clickHandler<span style="color: #66cc66;">&#40;</span>evt:MouseEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                numValidator.validate<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            protected function numValidator_validHandler<span style="color: #66cc66;">&#40;</span>evt:ValidationResultEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                Alert.show<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DropDownList item selected: &quot;</span> + ddl.selectedItem.toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, evt.type<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            protected function numValidator_invalidHandler<span style="color: #66cc66;">&#40;</span>evt:ValidationResultEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                Alert.show<span style="color: #66cc66;">&#40;</span>ddl.prompt, evt.type<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:NumberValidator</span> id=<span style="color: #ff0000;">&quot;numValidator&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;{ddl}&quot;</span></span>
<span style="color: #000000;">                property=<span style="color: #ff0000;">&quot;selectedIndex&quot;</span></span>
<span style="color: #000000;">                minValue=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                lowerThanMinError=<span style="color: #ff0000;">&quot;{ddl.prompt}&quot;</span></span>
<span style="color: #000000;">                valid=<span style="color: #ff0000;">&quot;numValidator_validHandler(event);&quot;</span></span>
<span style="color: #000000;">                invalid=<span style="color: #ff0000;">&quot;numValidator_invalidHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;ddl&quot;</span> prompt=<span style="color: #ff0000;">&quot;Please select an item&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ArrayList</span> source=<span style="color: #ff0000;">&quot;[one,two,three,four,five,six,seven]&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:DropDownList</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> label=<span style="color: #ff0000;">&quot;validate&quot;</span> click=<span style="color: #ff0000;">&quot;button1_clickHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_requiresSelection_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_DropDownList_requiresSelection_test/main2.html" width="100%" height="300"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Checking that an item is selected in the Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/',contentID: 'post-2597',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,lowerThanMinError,requiresSelection,selectedIndex',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/03/12/checking-that-an-item-is-selected-in-the-spark-dropdownlist-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting the selected item on the FxButtonBar control in Flex Gumbo</title>
		<link>http://blog.flexexamples.com/2009/02/21/setting-the-selected-item-on-the-fxbuttonbar-control-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/02/21/setting-the-selected-item-on-the-fxbuttonbar-control-in-flex-gumbo/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 05:49:51 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[FxButtonBar]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[requiresSelection]]></category>
		<category><![CDATA[selectedItem]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/21/setting-the-selected-item-on-the-fxbuttonbar-control-in-flex-gumbo/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/">&#8220;Setting the selected index on the FxButtonBar control in Flex Gumbo&#8221;</a>, we saw how you could set the selected index on a Flex Gumbo FxButtonBar control by setting the selectedIndex property.</p> <p>The following example shows how you can set the selected item on a Flex Gumbo FxButtonBar control by setting [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2009/02/21/setting-the-selected-index-on-the-fxbuttonbar-control-in-flex-gumbo/">&#8220;Setting the selected index on the FxButtonBar control in Flex Gumbo&#8221;</a>, we saw how you could set the selected index on a Flex Gumbo FxButtonBar control by setting the <code>selectedIndex</code> property.</p>
<p>The following example shows how you can set the selected item on a Flex Gumbo FxButtonBar control by setting the <code>selectedItem</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-972"></span></p>
<p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For more information on downloading and installing the Gumbo SDK into Flex Builder 3, see <a href="http://blog.flexexamples.com/2008/08/02/using-the-beta-gumbo-sdk-in-flex-builder-3/">&#8220;Using the beta Gumbo SDK in Flex Builder 3&#8243;</a>.</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/02/21/setting-the-selected-item-on-the-fxbuttonbar-control-in-flex-gumbo/ --&gt;
&lt;Application name="FxButtonBar_selectedItem_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;Script&gt;
        import mx.utils.ObjectUtil;
    &lt;/Script&gt;

    &lt;ApplicationControlBar dock="true"&gt;
        &lt;Form styleName="plain"&gt;
            &lt;FormItem label="requiresSelection:"&gt;
                &lt;FxCheckBox id="checkBox" /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label="selectedItem:"&gt;
                &lt;Label text="{ObjectUtil.toString(btnBar.selectedItem)}" /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem direction="horizontal"&gt;
                &lt;FxButton label="Select none"
                        fontWeight="bold"
                        click="btnBar.selectedItem = null;" /&gt;
                &lt;FxButton label="Select 'One'"
                        click="btnBar.selectedItem = 'One';" /&gt;
                &lt;FxButton label="Select 'Two'"
                        click="btnBar.selectedItem = 'Two';" /&gt;
                &lt;FxButton label="Select 'Three'"
                        click="btnBar.selectedItem = 'Three';" /&gt;
            &lt;/FormItem&gt;
        &lt;/Form&gt;
    &lt;/ApplicationControlBar&gt;

    &lt;FxButtonBar id="btnBar"
            requiresSelection="{checkBox.selected}"&gt;
        &lt;dataProvider&gt;
            &lt;ArrayCollection source="[One,Two,Three,Four,Five,Six]" /&gt;
        &lt;/dataProvider&gt;
    &lt;/FxButtonBar&gt;

&lt;/Application&gt;
</pre>
<p class="alert">This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the selected item on the FxButtonBar control in Flex Gumbo on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/02/21/setting-the-selected-item-on-the-fxbuttonbar-control-in-flex-gumbo/',contentID: 'post-972',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,requiresSelection,selectedItem',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/02/21/setting-the-selected-item-on-the-fxbuttonbar-control-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Requiring a user has an item selected on the FxButtonBar in Flex Gumbo</title>
		<link>http://blog.flexexamples.com/2009/02/09/requiring-a-user-has-an-item-selected-on-the-fxbuttonbar-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/02/09/requiring-a-user-has-an-item-selected-on-the-fxbuttonbar-in-flex-gumbo/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 07:28:49 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[FxButtonBar]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[requiresSelection]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/09/requiring-a-user-has-an-item-selected-on-the-fxbuttonbar-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can make sure that the Flex Gumbo FxButtonBar control has an item selected by setting the Boolean requiresSelection property.</p> <p>Full code after the jump.</p> <p></p> <p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can make sure that the Flex Gumbo FxButtonBar control has an item selected by setting the Boolean <code>requiresSelection</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-958"></span></p>
<p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For more information on downloading and installing the Gumbo SDK into Flex Builder 3, see <a href="http://blog.flexexamples.com/2008/08/02/using-the-beta-gumbo-sdk-in-flex-builder-3/">&#8220;Using the beta Gumbo SDK in Flex Builder 3&#8243;</a>.</p>
<p class="download"><a href="">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/02/09/requiring-a-user-has-an-item-selected-on-the-fxbuttonbar-in-flex-gumbo/ --&gt;
&lt;Application name="FxButtonBar_requiresSelection_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;Script&gt;
        &lt;![CDATA[
            import mx.utils.ObjectUtil;
        ]]&gt;
    &lt;/Script&gt;

    &lt;Declarations&gt;
        &lt;ArrayCollection id="arrColl"
                source="[One,Two,Three,Four,Five]" /&gt;
    &lt;/Declarations&gt;

    &lt;ApplicationControlBar dock="true"&gt;
        &lt;Form styleName="plain"&gt;
            &lt;FormItem label="requiresSelection:"&gt;
                &lt;FxCheckBox id="checkBox"
                        selected="true" /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label="selectedIndex:"&gt;
                &lt;Label text="{btnBar.selectedIndex}" /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label="selectedItem:"&gt;
                &lt;Label text="{ObjectUtil.toString(btnBar.selectedItem)}" /&gt;
            &lt;/FormItem&gt;
        &lt;/Form&gt;
    &lt;/ApplicationControlBar&gt;

    &lt;FxButtonBar id="btnBar"
            dataProvider="{arrColl}"
            requiresSelection="{checkBox.selected}" /&gt;

&lt;/Application&gt;
</pre>
<p class="alert">This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Requiring a user has an item selected on the FxButtonBar in Flex Gumbo on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/02/09/requiring-a-user-has-an-item-selected-on-the-fxbuttonbar-in-flex-gumbo/',contentID: 'post-958',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,requiresSelection',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/02/09/requiring-a-user-has-an-item-selected-on-the-fxbuttonbar-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

