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  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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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....
 
Consider Paul's rocket mass heater.
 
subject: body onload is hitting more then once while calling methods in JSF
 
Similar Threads
getting the cursor to appear by default
Javas cript onLoad() function
How to set a drop down value
Conditional PopUp Window
Calling method during onload of jsf page