wood burning stoves 2.0*
The moose likes JSF and the fly likes  body onload is hitting more then once while calling methods in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark " body onload is hitting more then once while calling methods in JSF " Watch " body onload is hitting more then once while calling methods in JSF " New topic
Author

body onload is hitting more then once while calling methods in JSF

kumar Rathinam
Greenhorn

Joined: Jul 18, 2011
Posts: 3
function test(){
document.getElementById('formName:buttonId').click();
}

<body on~load="test();">

<h:commandButton action="#{backingBean.methodName}" id="buttonId" style="display: none"/>
</body>


Hi i am trying to use the function on body onload .its hitting more then once test();
Test function is called endless loop...

Thanks
kumar
Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

Check the navigation rule in faces-config once. Did you specify proper navigation rule from this page once you hit the action button?
kumar Rathinam
Greenhorn

Joined: Jul 18, 2011
Posts: 3
Shasi Mitra wrote:Check the navigation rule in faces-config once. Did you specify proper navigation rule from this page once you hit the action button?


hi in faces-config i didn't do anything....
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: body onload is hitting more then once while calling methods in JSF