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();
}
dimanche 23 novembre 2008
Nugg Viewer - BSP enhancement
Site enhancement
Concerning the blog, I've added a counter and an "entry" in Google Analytics. The counter comes from: Compteur.cc.
mardi 18 novembre 2008
Adobe and mobile plateforms
To read: adobe is going to attack the market of mobile platforms and linux 64!
dimanche 16 novembre 2008
About the development ...
As I told you, I love to test new things. About one year ago, Microsoft released XAML, a declarative language to code interface for .Net program. To test it, I needed to find a little project useful for me... Then I remember that I was not happy when I had to find in a saved code source some stuffs...Why? b/c the source code was in a nugg file, and even if XML is supposed to be human readable, it wasn't the case with this file! => I've found my project. After some week-ends playing with XAML, I begin to think that the .Net framework was too complex for building a simple application. In the same time, I was discovering the power of WebDynPro Abap and the beautiful implementation of the MVC design pattern. So, I begun to test different framework like ROR (Ruby On Rails), Zend (Php)... and finally Flex. I found the language and the framework I was looking for. Indeed, the ActionScript 3 has all the power of an OO language, but has also a wide range of useful libraries (XML, List…). Flex support a simple but powerful databinding on graphical components.
Use and functionality
Use:
- just drag and drop an nugg file on the application
- view classes
- view reports
- view bsp (not yet finished)
- simple syntax coloration (abap keywords and comments)
- Adobe AIR runtime
- b/c AIR is cross-platform, this application should work on any OS
- Full BSP support
- WebDynPro Abap support
Inscription à :
Articles (Atom)
