webtier@glassfish.java.net

Probelm using DynaFaces getElementById does not works in ajaxZone

From: <webtier_at_javadesktop.org>
Date: Thu, 13 Nov 2008 15:34:08 PST

Hi,
I m developing a project and I am using Dynamic Faces for ajax.
I have 2 problems that i can't resolve.

the first:
 
I have a command button between in an ajaxZone, this button is not visible, and it lunch its action when anotheer element is pressed
the action of this button is an ajax transaction. so I have this code:
[code]
 <jsfExt:ajaxZone execute="zone1,zone2" render="zone1.zone2">
                <h:commandButton id="commandbutton2" actionListener="#{contocliente.modificaimporto}" value="prova" style="display:none"/>
           </jsfExt:ajaxZone>
[/code]
the click on this button is not made from the user but when another element is clicked a javascript function is called and in this js function i have this:
[code]
document.getElementById('commandbutton2').click();
[/code]
but i always get and error in the browser : ti says that documentGetElementById(...) is null or is not an object.
If i delete the ajaxZone everyting Works fine.
The second problem is I can't send an ajax request using DynaFaces.fireAjaxTransaction when the event is an action event
it works only with a valueChangeEvent but not with an ActionEvent... why?

Thanks alot in advance
Regards
Laz
[Message sent by forum member 'lazarus___' (lazarus___)]

http://forums.java.net/jive/thread.jspa?messageID=316673