mercredi 25 février 2009
SDN NUGG file available !!
The missing file related to the article I wrote on SDN is available on my web site (page download)!!
Own web site is running in beta version...
... and this is the occasion to put the "Nugg viewer (V1.2) " available in the dowload page !!!
So my Web site is locate here: click me to get there!
So my Web site is locate here: click me to get there!
mercredi 7 janvier 2009
Flex DataGrid cannot handle complex XML
I have an XML like:

...and it seems that you cann ot bind the node PhoneNumbers/PhoneNumber in the datagrid using something like:
< mx:datagridcolumn datafield="PhoneNumbers.PhoneNumber.@id"
So, to archieve it, you can use the "labelFunction" to get access to the nested structure...but I prefer to re-build a flat XML from the original one!
So, the solution I found: I use a getter/setter for my bindable XMLListCollection property, and in the setter, I create the "flat copy"
Not clear?
Here is the code:

Last minute: a *VERY* interesting article that explains how to deal with nested XML structures: link.

< mx:datagridcolumn datafield="PhoneNumbers.PhoneNumber.@id"
So, to archieve it, you can use the "labelFunction" to get access to the nested stru
So, the solution I found: I use a getter/setter for my bindable XMLListCollection property, and in the setter, I create the "flat copy"
Not clear?
Here is the code:

Last minute: a *VERY* interesting article that explains how to deal with nested XML structures: link.
mercredi 17 décembre 2008
Article on SDN
Cool, I wrote a little tool in Abap to extract data, so that I can see them in a graphical format...and it has been published on the SAP Developer Network: here. The sad thing is that the embedded files within the document haven't been correctly imported to the web site :-(
mercredi 26 novembre 2008
htmlText in TextArea
It seems normal that when you pass "<" or ">" in an HTML component for rendering, you get something wrong, but the implementation of the mx:TextArea is quite weird! It stops all the rendering! Meaning, if you have this character in the first HTML line, all the rest of your page doesn't appears! (This was a bug in the NuggViewer => fixed now)
How to use AIR files without administrator rights?
Or, to reformulate the question:
- How to put an AIR application on an USB key?
- How to use an AIR application without having to put some things in the window registry?
- How to use an AIR application without having to launch the AIR runtime installer?
- I use the AIR Debug Launcher (ADL) from the AIR SDK: "It allows you to test an AIR application without having to package and install it"
- You can find it in the AIR SDK directory: Bin\adl.exe
- Just drag and drop (or use command line) your "xxxx-app.xml" file (from your compiled directory) on the ADL application
dimanche 23 novembre 2008
Binding of all attributes of an XML node to a DataGrid
I've wanted to bind all attributes (name and value) to a datagrid (see previous post about NuggViewer and BSP attributes). I'm didn't find an easy way to do it, so I used two "label Functions" (one for the name and another for the value). So, it gives something like:
Data:
<page APPLNAME="ZHRHAP_BSP_CE" PAGEKEY="BODY.DO" PAGENAME="body.do" AUTHOR="PTG76743" CREATEDON="20080708" CHANGEDBY="PTG76743" CHANGEDON="20080708" IMPLCLASS="CL_BSP_HAP_DOCUMENT_COH2" GENDATE="20080708" GENTIME="121613" PAGETYPE="C" CHANGETIME="120955" BROWSER_CACHE="0 " SERVER_CACHE="0 " LAYOUTLANGU="E" VERSION="A" DEVCLASS="$TMP" LANGU="E" DESCRIPT="Body Controller"/>
Flex code:
<mx:DataGrid dataProvider="{LV_XmlBSP_Page.@*}">
<mx:columns>
<mx:DataGridColumn headerText="Name" labelFunction="Lbl_Fction_AttrName" />
<mx:DataGridColumn headerText="Attribute" labelFunction="Lbl_Fction_AttrValue" />
</mx:columns>
</mx:DataGrid>
//------------------------------------------------------------------------------------------------
// Label function to display value and name of XML attributes
//------------------------------------------------------------------------------------------------
private function Lbl_Fction_AttrName(obj_data:XML, obj_dataGridColumn:DataGridColumn):String
{
return obj_data.name();
}
private function Lbl_Fction_AttrValue(obj_data:XML, obj_dataGridColumn:DataGridColumn):String
{
return obj_data.toXMLString();
}
Data:
<page APPLNAME="ZHRHAP_BSP_CE" PAGEKEY="BODY.DO" PAGENAME="body.do" AUTHOR="PTG76743" CREATEDON="20080708" CHANGEDBY="PTG76743" CHANGEDON="20080708" IMPLCLASS="CL_BSP_HAP_DOCUMENT_COH2" GENDATE="20080708" GENTIME="121613" PAGETYPE="C" CHANGETIME="120955" BROWSER_CACHE="0 " SERVER_CACHE="0 " LAYOUTLANGU="E" VERSION="A" DEVCLASS="$TMP" LANGU="E" DESCRIPT="Body Controller"/>
Flex code:
<mx:DataGrid dataProvider="{LV_XmlBSP_Page.@*}">
<mx:columns>
<mx:DataGridColumn headerText="Name" labelFunction="Lbl_Fction_AttrName" />
<mx:DataGridColumn headerText="Attribute" labelFunction="Lbl_Fction_AttrValue" />
</mx:columns>
</mx:DataGrid>
//------------------------------------------------------------------------------------------------
// Label function to display value and name of XML attributes
//------------------------------------------------------------------------------------------------
private function Lbl_Fction_AttrName(obj_data:XML, obj_dataGridColumn:DataGridColumn):String
{
return obj_data.name();
}
private function Lbl_Fction_AttrValue(obj_data:XML, obj_dataGridColumn:DataGridColumn):String
{
return obj_data.toXMLString();
}
Inscription à :
Articles (Atom)