There's a lot of stuff going on in there - it's chaining. Why? What
else are you doing?
It's unlikely it's "doing nothing". Have you tried firebug? You could
be throwing an exception (unlikely, but possible, I suppose).
Also, why add this programmatically, instead of in the page itself? Not
that that shouldn't work, but I'm always curious when folks do stuff
like that.
Jim
On 7/28/09 3:33 AM, webtier_at_javadesktop.org wrote:
> Hi,
>
> I'm trying to attach ajax event via code like this:
>
> myButton.setOnclick("jsf.ajax.request(this, event, {execute: this.id, render: 'dataTable'}); return false;");
>
> Then clicking the button does nothing.
>
> The generated code is:
>
> <input type="submit" onclick="jsf.util.chain(this,event,'jsf.ajax.request(this, event, {execute: this.id, render: \'dataTable\'}); return false;','mojarra.jsfcljs(document.getElementById(\'form\'),{\'dataTable:3:j_id22\':\'dataTable:3:j_id22\',\'categoryId\':\'225\'},\'\')');return false" class="formbutton" value="Hozzáad" name="dataTable:3:j_id22"/>
>
> It might worth mentioning that the button button that should fire the ajax request is acutally inside the component that should be rendered wich is 'dataTable'.
>
> Any idea?
> [Message sent by forum member 'gabox01' (gabox01)]
>
> http://forums.java.net/jive/thread.jspa?messageID=357866
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>