CFFORM com ActionScript restrito, onde?
Para encerrar o ano de 2006, estou postando mais um filme sobre meus experimentos com CFFORM (CFMX 7.0.2) e ActionScript, espero que aprecie o mesmo tanto que apreciei.
youtube
ColdFusion RIA Flash Flex Apollo Webdesign WebDeveloper Flash Remoting Tutorial book meeting presentation website linux youtube google connect breeze mxstudio cf-brasil cfml mxml php xml javascript wsdl
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="myload.send()">
<mx:Panel layout="absolute" id="panel1" title="Tree" cornerRadius="13"
width="321" height="236">
<mx:Tree x="10" y="10" width="282" height="146" id="myTree"
dataProvider="{listDP}" labelField="@id"></mx:Tree>
</mx:Panel>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.collections.XMLListCollection;
import mx.controls.Alert;
[Bindable]
private var listDP:XMLListCollection = new XMLListCollection(new XMLList());
private function loadResult(event:ResultEvent):void{
var keys:Object = {
faturamento:["id","diafatura","empresa","cliente","valor"],
empresas:["id","codigo","razaoSocial","cnpj","observacao","created_at","updated_at","lock_version"]
};
var i:Number = 0;
var strNode:String = "";
var newNode:XML;
for(var x:String in myload.lastResult.tabela){
newNode = XML("<tabela id='"+x+"' data='"+x+"' />");
listDP.addItem(newNode);
for(var y:Number = 0; y < event.result.tabela[x][keys[x][0]].length;y++){
strNode = "<registro ";
for(var z:Number = 0 ; z < keys[x].length ;z++){
strNode += keys[x][z]+"='"+event.result.tabela[x][keys[x][z]][y]+"' ";
}
strNode += " />";
newNode = XML(strNode);
listDP[i].appendChild(newNode);
}
i++;
}
}
]]>
</mx:Script>
<mx:HTTPService id="myload" url="http://localhost:8080/cfusion/file.xml" result="loadResult(event)" />
</mx:Application>