<?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 two related ComboBoxes</title>
	<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 11:08:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Igor</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-16506</link>
		<author>Igor</author>
		<pubDate>Fri, 31 Oct 2008 18:27:10 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-16506</guid>
		<description>Peter,

Thank you so much! 
This is very good work.</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Thank you so much!<br />
This is very good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Azmi</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15836</link>
		<author>Azmi</author>
		<pubDate>Thu, 25 Sep 2008 02:02:03 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15836</guid>
		<description>Hi

In my current project, I want to achieve the same result but with different approach. I have 3 combobox, say Combo1, Combo2, Combo3. The values of Combo2 depends on selected value of Combo1, and values of Combo3 depends on selected value of Combo2. The values of all these 3 combobox should be populated through flash remoting (calling aspx files -- diff combobox will call diff aspx file) instead of creating an XML upfront. The aspx files will return an XML file(on the fly) to Flex . Here is how I call the aspx file for my Combo1:

&#60;dropdown:XMLComboBox x="176" y="26" width="160" id="Combo1" xmlFile="http://localhost/prbiclass/listCombo1.aspx" change="changeEvt(event)" /&#62;

This part works fine. I manage to get the list of values for Combo1. The problem starts here:

1. How do I pass the selected value of Combo1 to listCombo2.aspx in the changeEvt function? By right the url should look like this http://localhost/prbiclass/listCombo2.aspx?parameter=selectedValueOfCombo1

2. Assuming I manage to call the aspx in the ChangeEvt function, how do I bind the XML data into Combo2.

3. Is this efficient? coz there would be lots of remote calls.. Is there a better way to do it?

Thanks for your help.</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>In my current project, I want to achieve the same result but with different approach. I have 3 combobox, say Combo1, Combo2, Combo3. The values of Combo2 depends on selected value of Combo1, and values of Combo3 depends on selected value of Combo2. The values of all these 3 combobox should be populated through flash remoting (calling aspx files &#8212; diff combobox will call diff aspx file) instead of creating an XML upfront. The aspx files will return an XML file(on the fly) to Flex . Here is how I call the aspx file for my Combo1:</p>
<p>&lt;dropdown:XMLComboBox x=&#8221;176&#8243; y=&#8221;26&#8243; width=&#8221;160&#8243; id=&#8221;Combo1&#8243; xmlFile=&#8221;http://localhost/prbiclass/listCombo1.aspx&#8221; change=&#8221;changeEvt(event)&#8221; /&gt;</p>
<p>This part works fine. I manage to get the list of values for Combo1. The problem starts here:</p>
<p>1. How do I pass the selected value of Combo1 to listCombo2.aspx in the changeEvt function? By right the url should look like this <a href="http://localhost/prbiclass/listCombo2.aspx?parameter=selectedValueOfCombo1" rel="nofollow">http://localhost/prbiclass/listCombo2.aspx?parameter=selectedValueOfCombo1</a></p>
<p>2. Assuming I manage to call the aspx in the ChangeEvt function, how do I bind the XML data into Combo2.</p>
<p>3. Is this efficient? coz there would be lots of remote calls.. Is there a better way to do it?</p>
<p>Thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kastro</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15667</link>
		<author>Kastro</author>
		<pubDate>Wed, 17 Sep 2008 20:28:11 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15667</guid>
		<description>ahhhhhhhh...  The reason I had the  was because I wanted the user to be able to select from a group of floors that only pertain to the 6ft gallery. They can choose any product from the 6ft gallery, and choose any floor from 6ft gallery.. Like a mix/match..

*going to go play! 

Thanks both of you!

(if you know of how i can apply my mxml/xml based on the above scenario feel free to let me know :) but I dont want to be greedy w/ your generosity..</description>
		<content:encoded><![CDATA[<p>ahhhhhhhh&#8230;  The reason I had the  was because I wanted the user to be able to select from a group of floors that only pertain to the 6ft gallery. They can choose any product from the 6ft gallery, and choose any floor from 6ft gallery.. Like a mix/match..</p>
<p>*going to go play! </p>
<p>Thanks both of you!</p>
<p>(if you know of how i can apply my mxml/xml based on the above scenario feel free to let me know :) but I dont want to be greedy w/ your generosity..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15664</link>
		<author>peterd</author>
		<pubDate>Wed, 17 Sep 2008 19:07:44 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15664</guid>
		<description>Or, if you prefer, you can view the source/ZIP at http://flexexamples.com/temp/Kastro_bug/bin/srcview/index.html

Peter</description>
		<content:encoded><![CDATA[<p>Or, if you prefer, you can view the source/ZIP at <a href="http://flexexamples.com/temp/Kastro_bug/bin/srcview/index.html" rel="nofollow">http://flexexamples.com/temp/Kastro_bug/bin/srcview/index.html</a></p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15663</link>
		<author>peterd</author>
		<pubDate>Wed, 17 Sep 2008 18:56:05 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15663</guid>
		<description>Kastro,

Sorry for the slow reply. I had a few minutes to look at this today and saw two errors:
1) The binding is incorrect in your HTTPService tag. The HTTPService tag's &lt;code&gt;url&lt;/code&gt; property should use &lt;code&gt;comboDoor.selectedItem.url&lt;/code&gt; (node) and &lt;em&gt;NOT&lt;/em&gt; &lt;code&gt;comboDoor.selectedItem.@url&lt;/code&gt; (attribute):
&lt;pre class="code"&gt;
&#60;mx:HTTPService id=&#34;httpService&#34;
        resultFormat=&#34;e4x&#34;
        url=&#34;{comboDoor.selectedItem.&lt;strong style="color:red;"&gt;url&lt;/strong&gt;}&#34;/&#62;
&lt;/pre&gt;

2) The following XML (from your &lt;a href="http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15640" rel="nofollow"&gt;&lt;u&gt;6.xml example above&lt;/u&gt;&lt;/a&gt;) is not valid:
&lt;pre class="code"&gt;
&#60;?xml version="1.0"?&#62;
&#60;products&#62;
    &#60;item&#62;
        &#60;name&#62;Item1&#60;/name&#62;
        &#60;pic&#62;6/items/item1.jpg&#60;/pic&#62;
    &#60;/item&#62;
    &#60;item&#62;
        &#60;name&#62;Item 2&#60;/name&#62;
        &#60;pic&#62;6/items/item2.jpg&#60;/pic&#62;
    &#60;/item&#62;
&#60;/products&#62;
&#60;floors&#62;
    &#60;floor&#62;
        &#60;name&#62;floor1&#60;/name&#62;
        &#60;pic&#62;6/floors/floor1.jpg&#60;/pic&#62;
    &#60;/floor&#62;
    &#60;floor&#62;
        &#60;name&#62;floor2&#60;/name&#62;
        &#60;pic&#62;6/floors/floor2.jpg&#60;/pic&#62;
    &#60;/floor&#62;
&#60;/floors&#62;
&lt;/pre&gt;

The XML document has two root nodes &#60;products /&#62; and &#60;floors /&#62;. You either need to remove the &#60;floors /&#62; node (or &#60;products /&#62; node) or wrap them in a new root node. Something like &#60;root&#62;&#60;products /&#62;&#60;floors /&#62;&#60;/root&#62;

Hope that helps,
Peter</description>
		<content:encoded><![CDATA[<p>Kastro,</p>
<p>Sorry for the slow reply. I had a few minutes to look at this today and saw two errors:<br />
1) The binding is incorrect in your HTTPService tag. The HTTPService tag&#8217;s <code>url</code> property should use <code>comboDoor.selectedItem.url</code> (node) and <em>NOT</em> <code><a href="mailto:comboDoor.selectedItem.@url">comboDoor.selectedItem.@url</a></code> (attribute):</p>
<pre class="code">
&lt;mx:HTTPService id=&quot;httpService&quot;
        resultFormat=&quot;e4x&quot;
        url=&quot;{comboDoor.selectedItem.<strong style="color:red;">url</strong>}&quot;/&gt;
</pre>
<p>2) The following XML (from your <a href="http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15640" rel="nofollow"><u>6.xml example above</u></a>) is not valid:</p>
<pre class="code">
&lt;?xml version="1.0"?&gt;
&lt;products&gt;
    &lt;item&gt;
        &lt;name&gt;Item1&lt;/name&gt;
        &lt;pic&gt;6/items/item1.jpg&lt;/pic&gt;
    &lt;/item&gt;
    &lt;item&gt;
        &lt;name&gt;Item 2&lt;/name&gt;
        &lt;pic&gt;6/items/item2.jpg&lt;/pic&gt;
    &lt;/item&gt;
&lt;/products&gt;
&lt;floors&gt;
    &lt;floor&gt;
        &lt;name&gt;floor1&lt;/name&gt;
        &lt;pic&gt;6/floors/floor1.jpg&lt;/pic&gt;
    &lt;/floor&gt;
    &lt;floor&gt;
        &lt;name&gt;floor2&lt;/name&gt;
        &lt;pic&gt;6/floors/floor2.jpg&lt;/pic&gt;
    &lt;/floor&gt;
&lt;/floors&gt;
</pre>
<p>The XML document has two root nodes &lt;products /&gt; and &lt;floors /&gt;. You either need to remove the &lt;floors /&gt; node (or &lt;products /&gt; node) or wrap them in a new root node. Something like &lt;root&gt;&lt;products /&gt;&lt;floors /&gt;&lt;/root&gt;</p>
<p>Hope that helps,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kyle</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15662</link>
		<author>kyle</author>
		<pubDate>Wed, 17 Sep 2008 16:52:27 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15662</guid>
		<description>That's weird.  :(

I'm sending you an email right now from my Gmail account.  It's got the whole application + all the associated images, so it's about a 7MB zip. Sorry about the huge size.  It was just easier to lump it all together than try to weed out the stuff that isn't necessary.

Hopefully you can get something working!

Oh, and it's the fabric_httpservice.mxml file.  I forgot I had a number of versions with various functionality in there.</description>
		<content:encoded><![CDATA[<p>That&#8217;s weird.  :(</p>
<p>I&#8217;m sending you an email right now from my Gmail account.  It&#8217;s got the whole application + all the associated images, so it&#8217;s about a 7MB zip. Sorry about the huge size.  It was just easier to lump it all together than try to weed out the stuff that isn&#8217;t necessary.</p>
<p>Hopefully you can get something working!</p>
<p>Oh, and it&#8217;s the fabric_httpservice.mxml file.  I forgot I had a number of versions with various functionality in there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kastro</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15661</link>
		<author>Kastro</author>
		<pubDate>Wed, 17 Sep 2008 15:59:03 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15661</guid>
		<description>Going to take a look @ link and see what I can do.  But its all running locally.. :/

http://localhost:8888/flex/vinstall/

and what its trying to access when the combobox is selected is

http://localhost:8888/flex/vinstall/6.xml

*port is default for XAMPP

so its not going to another domain... Same applies when I try to run it from the dev dir

file://c:/flex/vinstall/

It does load the vinstall.xml from the beginning, just has the issues when it tries to load the 6.xml (minus the quotes in the name tag now) which is in the same dir..

C:\flex\vinstall\vinstall.xml
C:\flex\vinstall\6.xml

&#38; for the HTTP

C:\xampp\htdocs\flex\vinstall\vinstall.xml
C:\xampp\htdocs\flex\vinstall\6.xml



I'd like to take a look at your working example as then I can manipulate it and see what is different from what I have..

The countries/states example that this page is about works fine when I run it on both the http:// and via file:// 

Again I appreciate you helping me Kyle..</description>
		<content:encoded><![CDATA[<p>Going to take a look @ link and see what I can do.  But its all running locally.. :/</p>
<p><a href="http://localhost:8888/flex/vinstall/" rel="nofollow">http://localhost:8888/flex/vinstall/</a></p>
<p>and what its trying to access when the combobox is selected is</p>
<p><a href="http://localhost:8888/flex/vinstall/6.xml" rel="nofollow">http://localhost:8888/flex/vinstall/6.xml</a></p>
<p>*port is default for XAMPP</p>
<p>so its not going to another domain&#8230; Same applies when I try to run it from the dev dir</p>
<p><a href="file://c:/flex/vinstall/" rel="nofollow">file://c:/flex/vinstall/</a></p>
<p>It does load the vinstall.xml from the beginning, just has the issues when it tries to load the 6.xml (minus the quotes in the name tag now) which is in the same dir..</p>
<p>C:\flex\vinstall\vinstall.xml<br />
C:\flex\vinstall\6.xml</p>
<p>&amp; for the HTTP</p>
<p>C:\xampp\htdocs\flex\vinstall\vinstall.xml<br />
C:\xampp\htdocs\flex\vinstall\6.xml</p>
<p>I&#8217;d like to take a look at your working example as then I can manipulate it and see what is different from what I have..</p>
<p>The countries/states example that this page is about works fine when I run it on both the <a href="http://" rel="nofollow">http://</a> and via <a href="file://" rel="nofollow">file://</a> </p>
<p>Again I appreciate you helping me Kyle..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kyle</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15659</link>
		<author>kyle</author>
		<pubDate>Wed, 17 Sep 2008 15:29:23 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15659</guid>
		<description>Hmmm...I didn't look all that closely at your code last night, Kastro, but if I had to guess, it's something to do with this error you're receiving:
&lt;blockquote&gt;
[RPC Fault faultString="A URL must be specified with useProxy set to false." faultCode="Client.URLRequired" faultDetail="null"]
at mx.rpc.http::HTTPService/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\http\HTTPService.as:736]
&lt;/blockquote&gt;

It would seem as though you're trying to send data via a different domain to the application (or rather, you're trying to access it from a different domain) and as Flex/Flash are client-side technologies, that's a HUGE no-no.  Same thing applies to cross-domain JavaScript stuff.  Due to security risks, it's generally not possible...unless you use a proxy server or a server-side technology.

I did a quick Googling and this backed up what I thought:
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg10234.html

If that ISN'T the case, I'd be more than happy to send you my working example. :)</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230;I didn&#8217;t look all that closely at your code last night, Kastro, but if I had to guess, it&#8217;s something to do with this error you&#8217;re receiving:</p>
<blockquote><p>
[RPC Fault faultString=&#8221;A URL must be specified with useProxy set to false.&#8221; faultCode=&#8221;Client.URLRequired&#8221; faultDetail=&#8221;null&#8221;]<br />
at mx.rpc.http::HTTPService/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\http\HTTPService.as:736]
</p></blockquote>
<p>It would seem as though you&#8217;re trying to send data via a different domain to the application (or rather, you&#8217;re trying to access it from a different domain) and as Flex/Flash are client-side technologies, that&#8217;s a HUGE no-no.  Same thing applies to cross-domain JavaScript stuff.  Due to security risks, it&#8217;s generally not possible&#8230;unless you use a proxy server or a server-side technology.</p>
<p>I did a quick Googling and this backed up what I thought:<br />
<a href="http://www.mail-archive.com/flexcoders@yahoogroups.com/msg10234.html" rel="nofollow">http://www.mail-archive.com/flexcoders@yahoogroups.com/msg10234.html</a></p>
<p>If that ISN&#8217;T the case, I&#8217;d be more than happy to send you my working example. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kastro</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15653</link>
		<author>Kastro</author>
		<pubDate>Wed, 17 Sep 2008 13:58:49 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15653</guid>
		<description>Yea I tried that too, but it keeps giving me that proxy error.

I've tried running it right from the developing directory (ie: /users/kastro/etc etc) and via http://localhost/flex/etc etc

Tried it on OSX and Win32 with both returning the same results.  I know it has to be something small that I'm missing..

Could you either post your mxml/xml that is working for you? or shoot me an email?

fwatlington at tycoint .com

:)

Will check back later.. and thanks for the reply kyle..</description>
		<content:encoded><![CDATA[<p>Yea I tried that too, but it keeps giving me that proxy error.</p>
<p>I&#8217;ve tried running it right from the developing directory (ie: /users/kastro/etc etc) and via <a href="http://localhost/flex/etc" rel="nofollow">http://localhost/flex/etc</a> etc</p>
<p>Tried it on OSX and Win32 with both returning the same results.  I know it has to be something small that I&#8217;m missing..</p>
<p>Could you either post your mxml/xml that is working for you? or shoot me an email?</p>
<p>fwatlington at tycoint .com</p>
<p>:)</p>
<p>Will check back later.. and thanks for the reply kyle..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kyle</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15648</link>
		<author>kyle</author>
		<pubDate>Wed, 17 Sep 2008 02:16:10 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-15648</guid>
		<description>Hey Kastro...just out of curiosity, have you tried removing the quotes from inside your element tags?  That could be causing an issue when the value is being harvested.

Just a thought...</description>
		<content:encoded><![CDATA[<p>Hey Kastro&#8230;just out of curiosity, have you tried removing the quotes from inside your element tags?  That could be causing an issue when the value is being harvested.</p>
<p>Just a thought&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
