Sorry I am really new to flex, I'm not sure what you mean by value objects. The three classes I gave are Java Classes that are essentially a facade to further backend persistence code.
I remote directly to the ProjectList.java class and return an array of Projects. I cannot do what you suggested in actionscript as I only have the java objects that i am remoting to, and cannot reference those. I am beginning to think I am doing something seriously wrong as I only have one remote object, and am trying to access java objects contained in it. Do I need to have some kind of mapping of action script objects as well? Any articles and tutorials about accessing java objects would be a great help to. Thanks for your patience, Adam --- In [email protected], "valdhor" <[EMAIL PROTECTED]> wrote: > > Caveat: I use PHP with WebORB but I have done a lot of C++ in the past. > > So, to get this straight, you have a value object with a property that > contains another value object, right? Try... > > (project.summary as Summary).budget > > or > > Summary(project.summary).budget > > > > > > > --- In [email protected], "kroghadam" <akrogh@> wrote: > > > > Perhaps I should provide a little more detail on my problem, here are > > three stripped down java classes I am using, > > > > > > public class Project { > > private String name; > > private Summary summary; > > > > public Project(){ > > } > > > > ...usual get/set methods > > > > } > > > > public class Summary { > > private String clientName; > > private int budget; > > > > public Summary(){ > > } > > > > ...usual get/set methods > > } > > > > public ProjectList { > > private ArrayList<Project> projects; > > > > public ProjectList(){ > > } > > > > public Project[] getProjects() { > > buildProjects(); > > return projects.toArray(new Project[0]); > > } > > > > public void buildProjects() { > > Project project; > > Summary summary; > > projects = new ArrayList<Project>(); > > for(int i = 0; i<10;i++) { > > project = new Project(); > > project.setName("Name"+i); > > summary = new Summary(); > > summary.setBudget(10000); > > summary.setClientName("Client"+i); > > project.setSummary(summary); > > projects.add(projects); > > } > > } > > > > Within my flex code I use a remote object to the ProjectList and bind > > an ArrayCollection to the return value of getProjects(). I then pass > > the Project elements of this array to a component to display its > values. > > This is where my problem comes in. I can display the name of the > > project fine in the component by just using {project.name} but I have > > no idea how to access my Summary object to get its data. > > I thought I could just do {project.summary.budget} but that doesn't > > display anything. > > I really hope someone can help me solve this problem as I'v been stuck > > on it for some time now. > > > > Thanks again, > > > > -Adam > > --Flex Newbie > > > > > > --- In [email protected], "kroghadam" <kroghadam@> wrote: > > > > > > Hi everybody, I am really enjoying my first look into flex! > > > Unfortunately I have ran into a problem with remote objects to java > > > classes that have compositions of objects in them. In other words my > > > class has an instance variable that is another object whose data i > > > also want to access, preferably through the same remote object. > > > > > > If anyone has some pointers, links to examples or even source code I > > > would really appreciate it. > > > > > > Thanks in advance, > > > > > > -Adam > > > --Flex Newbie > > > > > >

