[Seaside] Re: Seaside URL and Flex

Thierry Thelliez thierry.thelliez.tech at gmail.com
Mon Sep 29 22:21:50 UTC 2008


Thanks for the answers and yes I saw the Glare project. But I wanted
something simple and mostly out of the box.

I found the solution:

The FLEX HTTPService is encoding the request URL and that's not
playing well with Seaside style.

I found another way to do it with a FLEX URLLoader (code sample
below). So far so good. The FLEX widget can talk back to Seaside to a
dynamic URL, get back some XML data and draw whatever FLEX can offer
(datagrid, charts,...). Cool. (Next step for me: https support?)

Thanks again.
Thierry


On the MXML side:

private var myLoader:URLLoader = new URLLoader();
...
private function initApp():void {
...
var request:URLRequest = new URLRequest(aSeasideURL);
                myLoader.addEventListener(Event.COMPLETE, onLoaded);
                myLoader.load(request);

	private function onLoaded(event:Event):void {
                sourceXML = XML(myLoader.data);
 }
...
private function onLoaded(event:Event):void {
                sourceXML = XML(myLoader.data);
}
...
<mx:XMLListCollection id="xmlList" source="{sourceXML.myXMLTagBelowRoot}"/>
...
<mx:DataGrid id="dataGrid" dataProvider="{xmlList}" width="100%" >


More information about the seaside mailing list