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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: body onload is hitting more then once while calling methods in JSF
 
Similar Threads
How to set a drop down value
Calling method during onload of jsf page
Javas cript onLoad() function
getting the cursor to appear by default
Conditional PopUp Window