Jesse:

I modified the demo to use @Any components with radio buttons in the AjaxSubmitExample page (such as the functionality originally intended). Now I left the demo broken, but it's not exactly the case with Tapestry radio buttons. If you see closely, I'm using @Any to create the radio buttons (the Tapestry radio buttons have other functions).

So, the question is, can I connect an @Any component to an @AjaxFieldObserver? Dojo sure can, through event.connect(), and the requisites are there: the component unique id, and the submit function. The only thing missing is the link. eventListener doesn't work because it appears to be only for form components.

I think maybe "FieldObserver" doesn't reflect the true meaning of this component. This is not a component on form elements, this is a *form submit* component (maybe AjaxSubmitEvent or something like that is more appropiate). So, I think users should be able to submit their AjaxForm in any way they can, without needing specific form components to do so. Don't you think??

Now, I have 2 approaches to connect these kinds of component:

1) Extend eventListener to accept non-form components. Is this actually possible? I don't understand - yet - the logic behind these render contributions, so I think you can give me some light in this respect.

2) Implement a binding component that's just a wrapper for dojo.event.connect(). Such as this:

<span jwcid="@AjaxConnect" component="component.someRadio" event="onclick" listener="component.someAjaxEvent" />

This would also do the trick. Of course it doesn't solve the Tapestry radio button issue, but it sure allows people to connect arbitrary elements to a submit event. Who knows? Maybe someone wants to submit their form in an image rollover!

(By the way, I also fixed a small bug in AjaxFieldObserver - now it's not taking form focus. ;)).

This FieldObserver is the only blocker, IMO, to the beta-1 release.

--
Ing. Leonardo Quijano Vincenzi
DTQ Software




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to