Oracle Blog

My Bonding with the Technical World

Wednesday Aug 01, 2007

Yeah i finally got a chance to try out flex and i should say that it was simply superb.The inspiration for this was my Guru's blog .Resources which were very handy while doing this were Flex starter's Guide and All Packages.

My requirement was to use an xml and then display it in a table using flex.My xml is dynamic so i wrote a servlet which prints out an xml file.

so now when i run the webapp it started displaying all the rows fantastically.But what i wanted was to get this UI in a portlet.So now let us convert this to a portlet.

In the flex project of flex builder there is a "bin" directory where all the output files are generated by flex.Take that whole directory and place it in your portlet and if the mxml file name was "MyFlexExample.mxml" you will find a file named MyFlexExample.html.

So rename that .html file as .jsp and make it the view page of your portlet and place the needed portlet taglibs at the top of that page.

And now you will find references to files(AC_OETags.js,history.js,MyFlexExample) in this jsp .In my case i copied all the files in the bin directory to "flex" directory under "web-src" of my portlet so finally when deployed i will have all these files under flex directory from root.So i encoded all the path's of these files and assigned them to some variables.