mip’s blog


openlaszlo file browser

Posted in openlaszlo by admin on the April 14th, 2008

Ok, my last post was about 12 Month ago. Ay, hard times since then, but i’ve developed my openlaszlo skills and today i’m proud to introduce my first really useful openlaszlo class.

For a project i needed a decent file browser, showing the files on the webserver and letting the user to select a file. So, if you need something like that (see pictures below), go ahead and grab a copy of the filebrowser openlaszlo class files.

filebrowser screenshot

filebrowser button area

filebrowser folders

How to use:
1. Copy the filebrowser.class.lzx file and the filebrowser_buttons directory to your openlaszlo application directory

2. Include the class-file like every library:
<include href="filebrowser.class.lzx"/>
3. and put an instance on your canvas like here:
<filebrowserclass name="fileBrowser" x="20" y="20" width="600" height="400" DirPath="files/" SrcPath="http://localhost/path/to/xml/provider.php" callAttributes="${{menuname:'read_mediadir'}}">
<button text="Cancel" onclick="parent.close()"/>
<button text="Select" onclick="parent.takeSelected(Debug.write,Debug)"/>
</filebrowserclass>

Yep, that’s it.

Ok, i know you’ll still have more questions, so i’ll post a short FAQ on the next post.

2 Responses to 'openlaszlo file browser'

Subscribe to comments with RSS or TrackBack to 'openlaszlo file browser'.

  1. litts said,

    on November 3rd, 2008 at 17:28

    Can your directory browse be used as a data grid

  2. admin said,

    on November 24th, 2008 at 08:23

    Hi Litts,

    sorry for the late reply. You can of course use data grids, but it would require some substantial rewritting of the code. If i got that finished i’ll post that for sure.

    thx & best,

    mip

Leave a Reply