AjaxEventSubmit does some of this, but not in as generic a way as you have described (which would be nice btw, just hard with the current implementation ) .
I wouldn't want to add anything in like this unless it worked in/out of forms as well as lists, but if you wanted to extend AjaxEventSubmit for your purposes that might be even more helpful...Even better would to add the around advice parameter to all the existing sort of shared dynamic logic (ie AjaxSubmit/AjaxDirectLink/AjaxForm/etc..)
What do you think your use cases might be for this?
On 1/13/06, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
What about to build a Tapestry component named stackevent built on dojo.event around??
<span jwcid="@tacos:Stackevent" direction="before" targetcomponent="ognl:myAjaxDlnk" targetmethod="onclick" functionname="foofunc"/>
Stackevent.scrpt should contain something like :
var ${StackeventId} = {
before : function (invocation) {
var result = false;
if (${functionname}(invocation)) {
result = invocation.proceed();
}
return result;
}
after : function (invocation) {
var result = false;
if (invocation.proceed()) {
result = ${functionname}(invocation);
}
return result;
}
};
dojo.event.connect("around",
dojo.byId('${myAjaxDlnkId}'),
'${targetmethod}',
${StackeventId},
'${direction}');
More or less.....
What do you think about ?
Do you think is it useful, do you want me to code it ?
Let me know....
Ciao,
kiuma
