all groups > flash data integration > november 2007 >
You're in the

flash data integration

group:

XMLConnector DataGrid DataSet ComboBox XUpdateResolver


XMLConnector DataGrid DataSet ComboBox XUpdateResolver GuiboV
7/24/2007 10:03:07 PM
flash data integration:
Hi there,

I'm trying to create a result page that displays a datagrid based on a simple
xml file. For that purpose I created a XMLConnector that feeds my DataSet,
which again feeds my DataGrid. Once displayed in the DataGrid, I would like to
things to happen.

1. I would like to use a combobox to interact with my results to refine my
search and
2. as I set the datagrid to editable, I would like the updates made within my
flash movie to modify my xml file.

I tried to create a XUpdater but i'm not clear to which component I have to
link it to and above all what parameters, bindings and schema i shall use.

Please does anyone know a good tutorial that explains all I need ?

Is there anyone outthere I could send my files to for a quick re-engineering ?

thanks

Guillaume




import mx.utils.Delegate;
var startTime:Number;
var loading:Boolean;
function addInfo(text:String):Void {
info_ta.text += newline+text;
info_ta.doLater(this, "updateInfoScrollPosition");
}
function updateInfoScrollPosition() {
info_ta.vPosition = info_ta.maxVPosition;
}
function doStart(eventObj:Object):Void {
loading = true;
startTime = getTimer();
client_con.trigger();
}
startButton.addEventListener("click", Delegate.create(this, doStart));
function selectMyRow():Void {
client_dg.selectedIndex = 3;
client_dg.dispatchEvent({type:"change"});
}
function doAfterLoaded(eventObj:Object):Void {
selectMyRow();
}
function doModelChanged(eventObj:Object):Void {
if (loading) {
addInfo("It works in : "+(getTimer()-startTime)+"ms");
loading = false;
}
}
client_ds.addEventListener("afterLoaded", Delegate.create(this,
doAfterLoaded));
client_ds.addEventListener("modelChanged", Delegate.create(this,
doModelChanged));
client_con.addEventListener("result", Delegate.create(this, doParseData));
function doParseData():Void {
var dataXML:XML = client_con.results;
var resultArray:Array = [];
var mainNode = dataXML.firstChild;
var aNode:XMLNode = mainNode.firstChild;
while (aNode) {
var obj = new Object();
for (var attribute:String in aNode.attributes) {
if (attribute != "country") {
obj[attribute] = Number(aNode.attributes[attribute]);
} else {
obj[attribute] = aNode.attributes[attribute];
}
}
resultArray.push(obj);
aNode = aNode.nextSibling;
}
client_ds.items = resultArray;
}
Re: XMLConnector DataGrid DataSet ComboBox XUpdateResolver GuiboV
7/25/2007 12:00:00 AM
by the way i'm using flash 8 professional.

Re: XMLConnector DataGrid DataSet ComboBox XUpdateResolver Gusmaster (Neoactiva)
11/2/2007 12:00:00 AM
I need the same thing, by the way, Are you using attibutes right? why not tags?
I have an xml with 4 child nodes and i can?t refresh the contents of the child
mean i was selecting parents. if you know something about that...?

thanks
GP
AddThis Social Bookmark Button