click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Finn Bock <bck...@gmail.com>
Subject Re: v.2.2.0 development notes
Date Sat, 13 Feb 2010 21:35:06 GMT
Bob Schellink <sabob1@gmail.com>:
>
> I've put together some proposals for improving Ajax support:
>
>  http://cwiki.apache.org/confluence/display/CLICK/Ajax+Proposals
>
> If you have any suggestions or questions let me know.

It is good to see that ajax will get some attention. I have a few questions:

1) My guess is that the inclusion of my-page.js does not happen
automatically. I will have to add it in onInit or the page ctor:

         getHeadElements().add(new JsImport("/mycorp/js/my-page.js");


2) In the "1. Ajax aware Page methods" proposal you write that no
other page event methods will be called, but I think some kind of
security check will be needed, so onSecurityCheck() should perhaps be
called.


3) What does the "click" string passed to the AjaxBehaviour ctor mean.
Is it the event that is bound to in jquery?


4) How does it handle multiple dom updates? Taconite?



My reaction so far:

I feel somewhat put off by the suggestion that even the simplest ajax
example requires that I write javascript. Even more so when the
javascript isn't easy to maintain:
a) id's must match between java and javascript.
b) duplicate target id (mylink in the example)
c) hardcode url of the page in javascript.

I think the target dom (or control) element(s) must be named when the
partial is created, otherwise it is too hard to read and understand an
ajax click application.

As far as I understand the proposals, I favor #3 without support for
#1. #1 is too simple IMO.

regards,
Finn

Mime
View raw message