Last time i writ about bumping into limitations with OpenLaszlo databinding features when interfacing with a REST based object, specifically its one-sidedness and lack of support for anything but ‘GET’ and ‘POST’ requests. Subsequently, i decided to see if Flex was any better in any of these regards.

After following a rather informative tutorial on Integrating Flex 2 and Ruby on Rails, i set to re-working the tutorial to fit the data i used i tried to use in OpenLaszlo, specifically an XML serialisation of the Project model in RailsCollab.
Sadly, i bumped into the same old issue of the HTTP code not supporting anything but ‘GET’ and ‘POST’ requests. Luckily though, this time i came across a rather helpful blog post in which it was suggested that passing in “_method=[method name here]” in a ‘POST’ request to override the HTTP method would work. And it did.
I also had a problem whereby the tutorial used a slightly different REST-like mechanism than was supported by the REST controller generated i used, so i had to dynamically change the url of the HTTP request when updating or deleting projects.
Subsequently, i ended up with a simple yet effective interface which manipulated Project object’s in my Rails application. Great!
Afterwards, i did experiment using techniques similar to what the tutorial uses in order to create an OpenLaszlo version. Unfortunately, a few things were missing from OpenLaszlo, like:
- Everything i mentioned previously.
- Form controls with associated labels (e.g. if i place an edittext it seems that i cannot also place a label beside it and directly associate it with the edittext).
- Vertical or Horizontal splitters (ok, i could have made these myself).
- Panels (ok, i could have used a window instead).
- The form component didn’t seem to want to update data in the associated dataset (not sure what was going on there).- (Update: seem to have fixed it after updating my nightly build and using ” dataform.datapath.updateData();”)
Safe to say, i gave up on that for now. Though i would like to revisit it in the near future as i am pretty sure with some more hacking i can get it to work.
For reference, you can download the Flex version of the code here.

Add New Comment
Viewing 1 Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)