<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Creating a custom ComboBox item renderer in Flex</title>
	<link>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Sat, 11 Oct 2008 20:51:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Tolga</title>
		<link>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-16048</link>
		<author>Tolga</author>
		<pubDate>Mon, 06 Oct 2008 18:32:19 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-16048</guid>
		<description>Hi Peter,

i've a problem with the &lt;code&gt;selectedItem&lt;/code&gt; property of the combobox when using an array as dataProvider. 

I got a dataGrid listing from httpService, e4x format xml.

sample xml is:
&lt;pre class="code"&gt;
&#60;root&#62;
 &#60;row&#62;
  &#60;domain&#62;batidental.com.tr&#60;/domain&#62;
  &#60;description/&#62;
  &#60;alias&#62;21&#60;/alias&#62;
  &#60;maxalias&#62;100&#60;/maxalias&#62;
  &#60;mailbox&#62;0&#60;/mailbox&#62;
  &#60;maxmailbox&#62;100&#60;/maxmailbox&#62;
  &#60;quota&#62;100&#60;/quota&#62;
  &#60;transport&#62;virtual&#60;/transport&#62;
  &#60;backupmx&#62;NO&#60;/backupmx&#62;
  &#60;modified&#62;2008-09-20 11:19:19&#60;/modified&#62;
  &#60;active&#62;YES&#60;/active&#62;
 &#60;/row&#62;
 &#60;row&#62;
  ..
 &#60;/row&#62;
&#60;/root&#62;
&lt;/pre&gt;

I want to automatically select combobox item via the datagrid &lt;code&gt;selectedItem&lt;/code&gt; addressing.
&lt;pre class="code"&gt;
&#60;mx:ComboBox id="ed_fTransport" editable="false" 
    dataProvider="['virtual','local','relay']"
    selectedItem="{domainList.selectedItem.transport}"/&#62;

&#60;!-- for testing --&#62; 							
&#60;mx:Text id="testBox" text="{domainList.selectedItem.transport}" /&#62;
&lt;/pre&gt;

In this case, dataGrid &lt;code&gt;selectedItem&lt;/code&gt; property for transport value retuns an &lt;code&gt;&#60;mx_internal_uid&#62;&lt;/code&gt; together with actual value like:

&lt;pre class="code"&gt;
&#60;transport&#62;
  virtual
  &#60;mx_internal_uid&#62;7B709DAD-E0F2-FB4C-4ACA-D3600DBF8C3B&#60;/mx_internal_uid&#62;
&#60;/transport&#62;
&lt;/pre&gt;

Looked in bug db however could not find any solution yet. I could use xmllist or fire up a function in actionscript, but this way it is easy to code, especially if you have lot's of similar form elements in an app.

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>i&#8217;ve a problem with the <code>selectedItem</code> property of the combobox when using an array as dataProvider. </p>
<p>I got a dataGrid listing from httpService, e4x format xml.</p>
<p>sample xml is:</p>
<pre class="code">
&lt;root&gt;
 &lt;row&gt;
  &lt;domain&gt;batidental.com.tr&lt;/domain&gt;
  &lt;description/&gt;
  &lt;alias&gt;21&lt;/alias&gt;
  &lt;maxalias&gt;100&lt;/maxalias&gt;
  &lt;mailbox&gt;0&lt;/mailbox&gt;
  &lt;maxmailbox&gt;100&lt;/maxmailbox&gt;
  &lt;quota&gt;100&lt;/quota&gt;
  &lt;transport&gt;virtual&lt;/transport&gt;
  &lt;backupmx&gt;NO&lt;/backupmx&gt;
  &lt;modified&gt;2008-09-20 11:19:19&lt;/modified&gt;
  &lt;active&gt;YES&lt;/active&gt;
 &lt;/row&gt;
 &lt;row&gt;
  ..
 &lt;/row&gt;
&lt;/root&gt;
</pre>
<p>I want to automatically select combobox item via the datagrid <code>selectedItem</code> addressing.</p>
<pre class="code">
&lt;mx:ComboBox id="ed_fTransport" editable="false"
    dataProvider="['virtual','local','relay']"
    selectedItem="{domainList.selectedItem.transport}"/&gt;

&lt;!-- for testing --&gt;
&lt;mx:Text id="testBox" text="{domainList.selectedItem.transport}" /&gt;
</pre>
<p>In this case, dataGrid <code>selectedItem</code> property for transport value retuns an <code>&lt;mx_internal_uid&gt;</code> together with actual value like:</p>
<pre class="code">
&lt;transport&gt;
  virtual
  &lt;mx_internal_uid&gt;7B709DAD-E0F2-FB4C-4ACA-D3600DBF8C3B&lt;/mx_internal_uid&gt;
&lt;/transport&gt;
</pre>
<p>Looked in bug db however could not find any solution yet. I could use xmllist or fire up a function in actionscript, but this way it is easy to code, especially if you have lot&#8217;s of similar form elements in an app.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brent</title>
		<link>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-9632</link>
		<author>Brent</author>
		<pubDate>Wed, 02 Apr 2008 18:49:57 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-9632</guid>
		<description>Thanks a ton! Exactly what I was looking for!</description>
		<content:encoded><![CDATA[<p>Thanks a ton! Exactly what I was looking for!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javier Julio</title>
		<link>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-7097</link>
		<author>Javier Julio</author>
		<pubDate>Wed, 20 Feb 2008 21:30:01 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-7097</guid>
		<description>Dan, you get the new value by working with the "value" property of the comboBox.</description>
		<content:encoded><![CDATA[<p>Dan, you get the new value by working with the &#8220;value&#8221; property of the comboBox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-3943</link>
		<author>Dan</author>
		<pubDate>Wed, 07 Nov 2007 02:27:23 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-3943</guid>
		<description>Can someone suggest how to make an "editable" combobox?  simply adding editable=true - only changes the display behavior,  how does one return then new value?</description>
		<content:encoded><![CDATA[<p>Can someone suggest how to make an &#8220;editable&#8221; combobox?  simply adding editable=true - only changes the display behavior,  how does one return then new value?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flex_sd</title>
		<link>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-2942</link>
		<author>flex_sd</author>
		<pubDate>Wed, 26 Sep 2007 17:30:49 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/09/25/creating-a-custom-combobox-item-renderer-in-flex/#comment-2942</guid>
		<description>peterd,

i'm designing custom combo box to auto open on mouseover and auto close on mouse out (i.e. without mouse selection). i'd like to also remove the down arrow entirely.

please post an example.

in my attempts, mouseOver="combobox.open()" opens the drop down list on mouseover. no problems there.

however mouseOut="combobox.close()" is triggered when the mouse leaves the combo box (fine) and when the mouse pointer moved into the drop down list (bugger!).

playing with itemRollOver/Out gets trick.

thought i'd challenge you here :^)

Thanks for the blog, it's very useful.</description>
		<content:encoded><![CDATA[<p>peterd,</p>
<p>i&#8217;m designing custom combo box to auto open on mouseover and auto close on mouse out (i.e. without mouse selection). i&#8217;d like to also remove the down arrow entirely.</p>
<p>please post an example.</p>
<p>in my attempts, mouseOver=&#8221;combobox.open()&#8221; opens the drop down list on mouseover. no problems there.</p>
<p>however mouseOut=&#8221;combobox.close()&#8221; is triggered when the mouse leaves the combo box (fine) and when the mouse pointer moved into the drop down list (bugger!).</p>
<p>playing with itemRollOver/Out gets trick.</p>
<p>thought i&#8217;d challenge you here :^)</p>
<p>Thanks for the blog, it&#8217;s very useful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
