MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guida Utente Pagina 238

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 256
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 237
238 Use the Data Management Service
View the fill methods
A fill method of the assembler class is called as a result of the client-side DataServices fill()
method being called. The following code example shows the two methods that are specified as
fill methods in the contact destination definition. The methods have the same name but
different signatures, yet both return a List object that contains Contact objects. One method
takes no arguments, while the other takes a name of type String as an argument. One of the
methods is called, depending on whether or not the
DataService.fill() request from the
client specifies an argument of type String.
...
import flex.data.ChangeObject;
...
public class ContactAssembler {
...
public List loadContacts() {
ContactDAO dao = new ContactDAO();
return dao.getContacts();
}
public List loadContacts(String name) {
ContactDAO dao = new ContactDAO();
return dao.getContacts(name);
}
...
Vedere la pagina 237
1 2 ... 233 234 235 236 237 238 239 240 241 242 243 ... 255 256

Commenti su questo manuale

Nessun commento