aspose 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 Java 8 in Action this week in the Java 8 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....
 
I agree. Here's the link: http://aspose.com/file-tools
 
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
Conditional PopUp Window
How to set a drop down value
Calling method during onload of jsf page