Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
kumar Rathinam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 101
Flex Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic