Brennan,

 

This is an approach commonly referred to as “Lazy Loading”.  There is a chapter in the Flex Help that talks about how to accomplish this.  I haven’t actually tried it, so I can’t be much help in the sense of “real expertise”, but I can direct you to the chapter so you might be able to get what you needJ  The only thing I am not sure of is if this works on primitive types, or only complex types with relations.  Below is the breadcrumbs to the area that might help you get started. 

 

Flex 2 Developer's Guide > Data Access and Interconnectivity > Configuring the Data Management Service > Managing hierarchical collections

 

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of dreuimar
Sent: Tuesday, July 25, 2006 2:03 PM
To: [email protected]
Subject: [flexcoders] Data Services...pull just the names initially, then the rest

 


I'm just starting out using data services with Java, and I've become
pretty comfortable filling collections with results from MySQL, etc.,
but here's an issue I have:

I have a long list of customers that gets pulled when a user logs in.
A drop down list displays all of the customers, and when selected the
information about that customer (address, city, state, etc.) is
supposed to be pulled from the database.

The issue is I don't want ALL of customers data pulled initially, just
their name.

So I have a class called customer that is managed and tied to a
corresponding Java class, and my dataservices fills an array
collection called clients with a bunch of these customer datatypes,
while ONLY setting the customer id and the name. There are other
properties in the class, such as address, etc., but they are left
null. There is also a boolean property called isSet which is by
default false.

I wanted my application to, when the customer is changed, figure out
if the customer data has been loaded yet (based on the isSet boolean)
and then fill in the rest of the classes' properties with that
particular customer's data. I then want to bind these properties to
text inputs so that if changed they'll be updated on the server.

Any suggestions on how I could do this?

Thanks,
Brennan

__._,_.___

--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to