Absolutely, doing ajax thing need a good scripting infrastructure.
Though It is difficult,  the good thing is you already be a commiter of Tapestry.

Does the Graphics example means that the AjaxWebRequest would be passed as an parameter to renderXXX method?
I am not sure this is good or not. but because of the Tapestry RequestCycle is injectable.
so  injectable AjaxWebRequest can let us use it anywhere  If we want(maybe make bugs for using it in wrong place).


On 12/4/05, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
P.P.S. I also plan on somehow introducing a global component attribute extension mechanism. As witnessed by the logic required to make adding random attributes to components, like "events=""" this is much too hard to do right now. Sort of a specification extension mechanism.


On 12/4/05, Jesse Kuhnert < [EMAIL PROTECTED]> wrote:
P.S. I found out that I don't actually have commit access yet, which is the only reason nothing's been done in the new branch yet.


On 12/4/05, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
I think something like this is exactly where I want to move things. I'm hoping to be able to change the interface for IScriptProcessor/PageRenderSupport in such a way that the already existing scripting infrastructure can handle everything we want transparently. ...The trick will be making sure it makes sense in cases where people aren't doing ajax stuff :)

The isAjaxRequest logic, all the if's everywhere I want to kill off like a bad nightmare. It's re-introducing an already problematic concept similar to the rewind cycle. This will probably be the hardest part. It may require changing the rendering logic of all the tapestry components slightly, but it will be worth it. I think the response builder concept will live on in one form or another, just because we don't want to tie tapestry to dojo completely. Who knows, something better may come along at some point :)

I'm thinking the AjaxWebRequest might be handleable sort of the same way that Graphics objects are handled in java AWT? Ie you can only use the "new" functionality of Graphics2 by doing something like this:

public void paint(Graphics g) {
 Graphics2 g2 = (Graphics2)g;

}

That still feels a little ickerific as well, but we'll see. Maybe having it injectable won't be as much of a big deal in the next release because it will be more of a rare ocurrence. The rendering cycle just needs to be tweaked a little bit. Instead of an all at once render it might be changeable into some of the interfaces howard already has, like prepareForRender() render() afterRender(), something like that.?

On 12/3/05, Felix Sun < [EMAIL PROTECTED]> wrote:
Hi All

Any ajax component I think should both work in normal response(page refresh) and ajax response(partial refresh)
we may also need to execute script in ajax response to build widget or do some other thing.
the current situation is we need to add scripts string to includeWriter/preprocessWriter/etc.
this can not take the advantage of script processing of Tapestry.

So does something like the following looks good?

if (ajaxRequest) {
    //may render somthing.
    getScript().execute(cycle, getAjaxEngine().getAjaxRequest().getResponseBuilder(), scriptParms);
    return;
}


Just some thoughts and maybe it is wrong. so please let me know if you have good idea about ajax response script processing.

- Felix




Reply via email to