RE: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree
Use either labelField of labelFunction. It looks like labelField will work in your case. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 5:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree I call a remote object successfully. I can check that because I can dump the result (XML) in a TextArea control: mx:TextArea text={functions.getTypesListAll.result}/ However, I want to show the results in a ComboBox or a tree: This is an example of functions.getTypesListAll.result - ?xml version=1.0 encoding=UTF-8? FunctionTypes FunctionType code=FUNC1 name=Function 1 DocType code=DOC1 name=DocDesc1/ DocType code=DOC2 name=DocDesc2/ /FunctionType /FunctionTypes - ComboBox: Bind FunctionType code and name. Tree: Parent FuntionType, child DocType. How can I do that? How can I use functions.getTypesListAll.result and use specific nodes of the XML? Thanks, --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree
Thanks Tracy, it seems to be the right solution but I can not get it to work. I created a test.xml with the following: ?xml version=1.0 encoding=UTF-8? FunctionTypes FunctionType code=FUNC1 name=Function 1 DocType code=DOC1 name=DocDesc1/ DocType code=DOC2 name=DocDesc2/ /FunctionType FunctionType code=FUNC2 name=Function 2 DocType code=DOC11 name=DocDesc11/ DocType code=DOC22 name=DocDesc22/ /FunctionType /FunctionTypes and then an application to test it: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:XML id=functionModel source=test.xml/ mx:ComboBox labelField = codedataProvider={functionModel} width=150 / mx:ComboBox labelField = FunctionType dataProvider={functionModel} width=150 / mx:ComboBox labelField = FunctionTypes dataProvider={functionModel} width=150 / /mx:Application All of the Comboboxes are empty. I actually need to show the list at the FunctionType level. Function 1 Function 2 Any advice? Thanks Oscar. Tracy SprattTo: flexcoders@yahoogroups.com [EMAIL PROTECTED] cc: Sent by: Subject: RE: [flexcoders] Binding remoteobject.method.result flexcoders@yahoogroups.com to a ComboBox or Tree 07/13/2005 07:20 PM Please respond to flexcoders Use either labelField of labelFunction. It looks like labelField will work in your case. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 5:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree I call a remote object successfully. I can check that because I can dump the result (XML) in a TextArea control: mx:TextArea text={functions.getTypesListAll.result}/ However, I want to show the results in a ComboBox or a tree: This is an example of functions.getTypesListAll.result - ?xml version=1.0 encoding=UTF-8? FunctionTypes FunctionType code=FUNC1 name=Function 1 DocType code=DOC1 name=DocDesc1/ DocType code=DOC2 name=DocDesc2/ /FunctionType /FunctionTypes - ComboBox: Bind FunctionType code and name. Tree: Parent FuntionType, child DocType. How can I do that? How can I use functions.getTypesListAll.result and use specific nodes of the XML? Thanks, --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from
RE: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree
XML is a bit strange. The dataProvider must be an array, so you need to do something like: dataProvider={functionModel.childNodes} I'll see if I can test it out later. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 7:58 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree Thanks Tracy, it seems to be the right solution but I can not get it to work. I created a test.xml with the following: ?xml version=1.0 encoding=UTF-8? FunctionTypes FunctionType code=FUNC1 name=Function 1 DocType code=DOC1 name=DocDesc1/ DocType code=DOC2 name=DocDesc2/ /FunctionType FunctionType code=FUNC2 name=Function 2 DocType code=DOC11 name=DocDesc11/ DocType code=DOC22 name=DocDesc22/ /FunctionType /FunctionTypes and then an application to test it: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:XML id=functionModel source=test.xml/ mx:ComboBox labelField = codedataProvider={functionModel} width=150 / mx:ComboBox labelField = FunctionType dataProvider={functionModel} width=150 / mx:ComboBox labelField = FunctionTypes dataProvider={functionModel} width=150 / /mx:Application All of the Comboboxes are empty. I actually need to show the list at the FunctionType level. Function 1 Function 2 Any advice? Thanks Oscar. Tracy SprattTo: flexcoders@yahoogroups.com [EMAIL PROTECTED] cc: Sent by: Subject: RE: [flexcoders] Binding remoteobject.method.result flexcoders@yahoogroups.com to a ComboBox or Tree 07/13/2005 07:20 PM Please respond to flexcoders Use either labelField of labelFunction. It looks like labelField will work in your case. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 5:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree I call a remote object successfully. I can check that because I can dump the result (XML) in a TextArea control: mx:TextArea text={functions.getTypesListAll.result}/ However, I want to show the results in a ComboBox or a tree: This is an example of functions.getTypesListAll.result - ?xml version=1.0 encoding=UTF-8? FunctionTypes FunctionType code=FUNC1 name=Function 1 DocType code=DOC1 name=DocDesc1/ DocType code=DOC2 name=DocDesc2/ /FunctionType /FunctionTypes - ComboBox: Bind FunctionType code and name. Tree: Parent FuntionType, child DocType. How can I do that? How can I use functions.getTypesListAll.result and use specific nodes of the XML? Thanks, --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately
RE: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree
I got some odd results with labelField, but labelFunction works fine: Tracy ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script![CDATA[ private function lblFuncCode(oItem:Object):String { return oItem.getProperty(code) } ]]/mx:Script mx:XML id=functionModel source=test.xml/ mx:ComboBox labelFunction=lblFuncCode dataProvider={functionModel.childNodes} selectedIndex=0 width=150 / /mx:Application -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Wednesday, July 13, 2005 9:31 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree XML is a bit strange. The dataProvider must be an array, so you need to do something like: dataProvider={functionModel.childNodes} I'll see if I can test it out later. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 7:58 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree Thanks Tracy, it seems to be the right solution but I can not get it to work. I created a test.xml with the following: ?xml version=1.0 encoding=UTF-8? FunctionTypes FunctionType code=FUNC1 name=Function 1 DocType code=DOC1 name=DocDesc1/ DocType code=DOC2 name=DocDesc2/ /FunctionType FunctionType code=FUNC2 name=Function 2 DocType code=DOC11 name=DocDesc11/ DocType code=DOC22 name=DocDesc22/ /FunctionType /FunctionTypes and then an application to test it: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:XML id=functionModel source=test.xml/ mx:ComboBox labelField = codedataProvider={functionModel} width=150 / mx:ComboBox labelField = FunctionType dataProvider={functionModel} width=150 / mx:ComboBox labelField = FunctionTypes dataProvider={functionModel} width=150 / /mx:Application All of the Comboboxes are empty. I actually need to show the list at the FunctionType level. Function 1 Function 2 Any advice? Thanks Oscar. Tracy SprattTo: flexcoders@yahoogroups.com [EMAIL PROTECTED] cc: Sent by: Subject: RE: [flexcoders] Binding remoteobject.method.result flexcoders@yahoogroups.com to a ComboBox or Tree 07/13/2005 07:20 PM Please respond to flexcoders Use either labelField of labelFunction. It looks like labelField will work in your case. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 5:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Binding remoteobject.method.result to a ComboBox or Tree I call a remote object successfully. I can check that because I can dump the result (XML) in a TextArea control: mx:TextArea text={functions.getTypesListAll.result}/ However, I want to show the results in a ComboBox or a tree: This is an example of functions.getTypesListAll.result - ?xml version=1.0 encoding=UTF-8? FunctionTypes FunctionType code=FUNC1 name=Function 1 DocType code=DOC1 name=DocDesc1/ DocType code=DOC2 name=DocDesc2/ /FunctionType /FunctionTypes - ComboBox: Bind FunctionType code and name. Tree: Parent FuntionType, child DocType. How can I do that? How can I use functions.getTypesListAll.result and use specific nodes of the XML? Thanks, --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http