Posts Tagged Flex

Editing Nested Data for Flex DataGrid

I needed to use a nested data object with a DataGrid. By default, the Flex (Moxie) DataGrid will not be able to display data in nested objects directly by using the dataField attribute in DataGridColumn.

An example of my nested object is as follows:

<persons>
    <boy>
        <name>TED</name>
    </boy>
        <name>TIM</name>
    <boy>
    </boy>
    <girl>
        <name>SUE</name>
    </girl>
    <girl>
        <name>ANN</name>
    </girl>
</persons>

Thank God, i found this article: Nested Data in Flex DataGrid by Extending DataGridColumn. I won’t explain how i use it here but you can go check it out there.

Here’s why i blogged about this. Well.. i needed to edit this nested data object. Setting “editable” to true did allow me to change the label but i could not commit the new value. The earlier mentioned blog article did gave me a hint of how to reference the actual field in the data object and i mixed it with the itemEditEnd event to commit the value manually.

Read the rest of this entry »

Bookmark and Share

Tags: , , , , ,

Are you holding back on your Flash Player version 10 upgrade?

Have you made the upgrade yet?

You can download the new version of Flash from here: http://www.adobe.com/go/getflashplayer.

Alright i am one of those who haven’t. I am looking forward to this upgrade though. With the new FileReference implementation, now i should be able to send Byte Data to my BlazeDS service. Yes FileUpload with BlazeDS should be possible now. I shall try it out this weekend and share.

Bookmark and Share

Tags: , , ,

Downloading Files with Flex

Just in case someone faced the same problem i did. Here’s the actual code to download a file with Flex


var fileToDownload:FileReference = new FileReference();
private function downloadFile(event:MouseEvent):void
{
var request:URLRequest = new URLRequest("file.txt");
fileToDownload.download(request, "aSpecificFilenameChosenByYou.txt");
}

It doesn’t work if your file reference object is declared as a local variable. For the non-coders, here is the negative example.

private function downloadFile(event:MouseEvent):void
{
var request:URLRequest = new URLRequest("file.txt");
var fileToDownload:FileReference = new FileReference();
fileToDownload.download(request, "aSpecificFilenameChosenByYou.txt");
}

Bookmark and Share

Tags: , ,

“Flex is strong because of Java”, i believe so too

Today, there is only one API for creating production grade front end for RIA talking to Java. It’s called Adobe Flex. In 2010, JavaFX may become another alternative. But meanwhile, please stop bashing Java. Do not forget that many of these new popular programming languages exist because there is a J2EE application they need to connect to. Do not forget that Java puts bread on the tables of many people (including mine) around the world. Do not spit in the well you drink from.

Yakov Fain from Farata Systems » Flex is strong because of Java.

I can feel so much from what Yakov has written. I totally agree with him. Coming from an enterprise world, it is really where the big money pot is. No offense to the other languages, you can laugh all you want about Java but you are missing out on the potential Java can give to a Flex application. I am still a little skeptical about JavaFX. Let’s see what Sun can do with JavaFX.

Bookmark and Share

Tags: , , ,

BlazeDS Presentation documents for August FUG

I have package my slides and source codes. Click here if you wish to download it.

Something that i was unable to share with everyone. I have used BlazeDS with Spring and Hibernate. For my Flex client, i have used Flex with Cairngorm.

Have a look at the codes…

Drop me a msg if you have trouble setting the source codes up. You can tweet me @kennethteo.

Bookmark and Share

Tags: , , , ,