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" <[EMAIL PROTECTED]> 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
>