Simple Laszlo Portfolio Gallery

By David Hayakawa

 
A custom Laszlo Portfolio gallery.
 
Issues:
One of the issues I ran into while working on this simple portfolio was the fact that paging isn't exactly a breeze in Laszlo. Since this is "supposed" to be rapid development I spent very little time trying to figure out how to get a large dataset to page. I think Laszlo Systems was able to do it with their flickr application but it wasn't obvious to me on how they did it.
 
So, instead I'm using a paging script that returns the dataset portion I need. It's probably more efficient to do it this way anyhow. The SOLO application requests which page to get and the xml is returned.
 
Issue 2:
Animating the orange box to grow didn't look very good all stretched out. The rounded corners were mangled. To get around this, I swap out the smaller orange box and animate the growth of the larger orange box. It's not entirely clean. There's a couple little "glitches" if you watch closely. I could have skipped the whole hack if I were to stay with square edges.
 
Issue 3:
Setting the resource of the dynamic image wasn't completely obvious. I had to comb through the forums. Of course the answer for most difficult problems are easy:
 

<view align="right" name="fullsize" datapath="@fullsizepath" opacity="0" >

<method name="applyData">

this.setSource(this.data);

</method>

</view>

I originally left out the method and the image wouldn't load. There of course had to be a way to set the value of the resource.  this.setSource() is the function to use to set the resource value get the dynamic image to load. @fullsizepath holds the full url to the image on my server. this.data references the value of the datapath.
 
All in all, pretty simple and fun.

Print this Page | Email this Page to a Friend