File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Calling a bean method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Calling a bean method" Watch "Calling a bean method" New topic
Author

Calling a bean method

David González
Greenhorn

Joined: Jun 26, 2009
Posts: 4
Hi.

I have followed this:

http://www.coderanch.com/t/211593/JSF/java/Calling-backingBean-method-javascript

but finally there is not a solution to this problem

I'm trying to simulate this code:

http://www.java2s.com/Tutorial/JavaScript/0200__Form/Buttonclick.htm

but no works with a little changes

I do this
javascript function


function myfunc() {
document.form_composition.button_name.click();

}

function del_onclick() {
window.open('http://www.yourserver.com/page-to-open.html','','toolbar=no,menubar=no,location=no,height=500,width=500');
}



<h:commandButton id="button_name"
onClick="del_onclick()" value="Test"
immediate="true" />

commandButton is into a form called "form_composition"

in this case myfunc() is called when the browser is closed, but it never fired.

Do I have to do something else???


Any suggestions???


thanks


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Calling a bean method