Sorry for the late response, I actually got it closer to what I need. I can
see the collection that the Remote Object is returning in a ComboBox.
However, I can see all attributes listed in the ComboBox separated by
commas. I only want to show one of them, the Description. So I figured I
will use labelField or labelFuntion, but didn't work. This is what I have:
Any ideas?
Server side:
public class LookupManager {
...
public Collection getTheList() {
// Set up default response
Collection response = null;
response = theList // gets the list from a Service
return response;
}
...
}
client side:
<mx:Script>
<![CDATA[
public var theList:Array= new Array();
function resultLookupHandler(result)
{
theList = result;
}
private function lblPriorityCode(oItem:Object):String
{
return oItem.getProperty("desc") // The original get in
s called getDesc, I tried both "desc' and "Desc" with no sucess.
}
]]>
</mx:Script>
<mx:RemoteObject id="lookup"
source="com.test.LookupManager"
result="resultLookupHandler(event.result)" >
</mx:RemoteObject>
<mx:Button label="Lookup" click="lookup.getTheList()"/>
<mx:ComboBox dataProvider="{theList}" labelFunction="lblListCode"
width="30%" height="20%"></mx:ComboBox>
"Shahnavaz Alware" To: [email protected]
<[EMAIL PROTECTED]> cc:
Sent by: Subject: RE: [flexcoders] How
to handle a returned Java
[email protected] Collection in Flex -
RemoteObject call
08/03/2005 02:23 PM
Please respond to
flexcoders
Can you post your code snippet? What you described in your email is right
way and should work if your code is doing right thing.
Thanks
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, August 03, 2005 9:32 AM
To: [email protected]
Subject: [flexcoders] How to handle a returned Java Collection in Flex -
RemoteObject call
I have a Java function that returns a Collection of VOs. I declared a
RemoteObject in Flex, and tried to assign the event.result to an Array
variable, but it actually didn't work. I want to use this data as the
DataProvider of ComboBoxes, or List, etc.
How can I read this data in Flex?
Thanks,
-Oscar.
---------------------------------------------------------------------------
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
Visit your group "flexcoders" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------------------------------------------------
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.
---------------------------------------------------------------------------
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hbmlo2j/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123194962/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In
low income neighborhoods, 84% do not own computers. At Network for Good, help
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~->
--
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/