MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guía de usuario Pagina 233

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 256
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 232
Build a distributed application with the Java adapter 233
Verify that your code is correct
Your code should match the following code example. Verify that the content is correct and
save the lesson2.mxml file.
<?xml version="1.0" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp();">
<mx:Script>
<![CDATA[
import mx.data.DataService;
import mx.collections.ArrayCollection;
import samples.contact.Contact;
public var ds:DataService;
[Bindable]
public var contacts:ArrayCollection;
public var contact:Contact;
public function initApp():void {
contacts = new ArrayCollection();
ds = new DataService("contact");
ds.fill(contacts);
}
]]>
</mx:Script>
<mx:DataGrid id="dg" dataProvider="{contacts}" editable="true">
<mx:columns>
<mx:DataGridColumn dataField="contactId" headerText="Id"
editable="false"/>
<mx:DataGridColumn dataField="firstName" headerText="First Name"
/>
<mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
Run the completed contact application
In this section, you run the completed contact application in two browser windows to see
automatic updates in one window when data changes in the other.
1. Run the application in two browser windows.
Vista de pagina 232
1 2 ... 228 229 230 231 232 233 234 235 236 237 238 ... 255 256

Comentarios a estos manuales

Sin comentarios