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
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply 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://zeroturnaround.com/jrebel/download
 
subject: body onload is hitting more then once while calling methods in JSF
 
Similar Threads
Calling method during onload of jsf page
getting the cursor to appear by default
How to set a drop down value
Javas cript onLoad() function
Conditional PopUp Window