Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic