webtier@glassfish.java.net

Ajax request+onclick

From: <webtier_at_javadesktop.org>
Date: Tue, 28 Jul 2009 03:33:11 PDT

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