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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 256
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 228
Build a distributed application with the Java adapter 229
View the samples.contact.Contact class
The following example shows the code of the Contact.as file that is in the DSLessons/
samples/contact directory. The
[RemoteClass] metadata tag maps this class to a
corresponding Java class on the server. The
[Managed] metadata tag ensures that the managed
Contact object supports the proper change events to propagate changes between the client-
based object and the server-based object.
package samples.contact
{
[Managed]
[RemoteClass(alias="samples.contact.Contact")]
public class Contact
{
public var contactId:int;
public var firstName:String = "";
public var lastName:String = "";
public var address:String = "";
public var city:String = "";
public var state:String = "";
public var zip:String = "";
public var phone:String = "";
}
}
Create an MXML file
In an MXML editor, create a text file that contains the following text and save it as
lesson2.mxml in the DSLessons directory of the samples web application:
<?xml version="1.0" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
</mx:Application>
Create the user interface
In this section, you create the editable DataGrid control that displays editable contact
information in the contact application.
Vedere la pagina 228
1 2 ... 224 225 226 227 228 229 230 231 232 233 234 ... 255 256

Commenti su questo manuale

Nessun commento