|
The ArrayCollection was returned from a CFC (just a simple
select * query).
Shan From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Farland Sent: Thursday, July 06, 2006 9:23 AM To: [email protected] Subject: RE: [flexcoders] arrayCollection to custom value object
I don’t have enough
information here to determine how you got an ArrayCollection in the first
place? From:
So, how can I get my
ArrayCollection row into my object? It's cool that I can test and see that it's
not working using "IS", but it doesn't solve the problem, just allows me to
trap it :) Shan From:
The item may not be an
instance of user, but rather an anonymous Object that contains the correct
properties that match the public interface of the user class. The “as” operator
returns null if the instance cannot be coerced into the requested type… where as
traditional casting syntax will throw an error. You can use
getQualifiedClassName or the “is” operator to determine whether an instance is
of a particular type before casting or using the as
operator. From:
So, I've got an ArrayCollection and
a defined value object. The ArrayCollection has just one record in it, and the
data matches the valueObject perfectly. Here's my
code: model.currentUser.userID
=
loginResult.getItemAt(0).userID; If I do EITHER OF THESE (not all at
once), model.currentUser remains NULL: 1 model.currentUser
= loginResult.getItemAt(0) as
user;
-- -- -- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
-- |
- RE: [flexcoders] arrayCollection to custom value object Peter Farland
- RE: [flexcoders] arrayCollection to custom value object Shannon Hicks
- RE: [flexcoders] arrayCollection to custom value ob... Peter Farland
- RE: [flexcoders] arrayCollection to custom valu... Shannon Hicks

