File Explorer in Flex

Okay, this one’s coming at you straight from the customer request files! Last week I had a customer ask for an example showing Tree control manipulation based off RemoteObject calls. The customer asked for an example where node data would be appended dynamically as data was returned. They were displaying hierarchical data specific to their business, so I went for the next best thing - system file data.

It turned out to be easy enough to emulate file system structure in a Tree control based off service call results, so I couldn’t just stop there. I figured that I’d keep going and provide additional display metaphors. Windows Explorer displays additional file data in a grid, and upon deconstructing its behavior, reflects navigation in the tree in a somewhat complex fashion as well. The example is available for your convenience.

I implemented a simple Java object as the service, and that provides me with some convenience methods for accessing the data in the form I want/need. I’d likely refactor that code somewhat, so don’t use it as a pure reference of what should be done on the server-side (outside of the pattern of providing a service adapter). I’ve also roughed in the MXML for direct file access through an address bar. I haven’t hooked it up, but the code is there for you to expand upon if you so please.

My favorite part of the application is the formatting, totaling, and summation that take place at various points. In the following Captivate demonstration for example, you’ll notice that right out of the gate there’s a total for the number of objects, and their combined size (in GB) in the status bar. As the Tree is navigated, those values will change - and they’re even intelligent about the units in which they display (not always GB). Formatting also takes place in the DataGrid through labelFunction properties on the DataGridColumns.


WordPress database error: [Can't open file: 'wp_comments.MYI' (errno: 145)]
SELECT * FROM wp_comments WHERE comment_post_ID = '78' AND comment_approved = '1' ORDER BY comment_date

Comments are closed.