getAllCelebrities();
}
public Celebrity getCelebrity()
{
return celebrity;
}
public void setCelebrity(Celebrity celebrity)
{
this.celebrity = celebrity;
}
public Format getDateFormat()
{
return Formats.getDateFormat();
}
}
First of all, notice a private class member named celebrity and getter and setter
methods associated with it. This is where the exchange of information between
the Loop component and all those components filling in a row in the table with
information happens.
Loop receives a list of celebrity objects from the getAllCelebrities method. It then
displays the rows of the table, and iterates through the received list simultaneously,
one by one. It takes the first Celebrity object from the list and assigns a reference to
this object to the celebrity page property. It then displays the first row of the table,
and all the expansions and components embedded into that row obtain their details
from the first Celebrity object in the list. Then the second object is taken, assigned
to the celebrity property, the second row of the table is displayed, and so on.
You might have noticed that the data source is declared as a MockDataSource, that is
a concrete implementation rather than a IDataSource interface that we have created
previously.
Pages:
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140