[aida] The greatest thing since sliced bread

Eli Green eli.green at mac.com
Sat Jan 24 10:37:47 CET 2009

On Friday, January 23, 2009, at 12:25AM, "Janko Mivšek" <janko.mivsek at eranova.si> wrote:
>This plan perfectly correct. Making it ajaxified will make it even
>better. In short:
>1. put a table of object in a seperate method, say #tableElement.
>2. send every input in form #onChangePost to post it after entering, let
>it post it to a temporary new object.
>3. add a button and send it #onClickUpdate: aTableElement. In above
>#tableElement method then check at the start to see if a new element is
>to be added.
>This is a quick idea from my head, maybe not the most elegant, but one
>of possibilities how to proceed towards the goal to have a fully
>ajaxified entry to your list.

I've just had a moment to sit down and take a look at how this is done and from what I'm seeing there's no way to integrate the current action methods into this setup. What I would ideally like is to be able to say this:

(e addButtonText: 'Add' action #addObject) onClickUpdate: objectList.

Ideally, what the Ajax handler should do is to still call the normal actionMainAddObject before refreshing the objectList component. If we return "false" in the onClick javascript handler, the page will not actually be submitted normally. It's not a big issue but it would be nice to be able to code this consistently. It has the added benefit of being able to work whether the user's browser supports javascript or not but to be perfectly honest I'm not sure how many lynx/links users I need to worry about.

Oh, another benefit is that the form data gets posted all at once when the user has finished editing it, saving us the round-trips to and from the server.

Anyway, not a major complaint, just a suggestion!


More information about the Aida mailing list