This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a bean method

 
David González
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic