title: h:commandButton with an action and then page-navigation in JSF?
body: <p>Is it possible to have a commandButton that executes a method of a certain backing bean and then also navigates to a different page? </p>
  
  <p>I know that I could return a String in the method that the commandButton calls, but the method is also used on the target-page, meaning it's often called from that same page. 
  So for calls that come from the same page, the redirect would be unnecessary and I would like to avoid that. </p>
  
  <p>The options that I have in mind right now: </p>
  
  <ul>
  <li>Create a separate method for the "remote" call of the method that does the same logic and also redirects to the page</li>
  <li>Use an additional h:button and use JavaScript so that if the commandButton is pressed, the h:button is pressed at the same time (Probably bad practice tho)</li>
  </ul>
  
  <p>Any option I am missing? Is there any way to tell the commandButton itself that it's supposed to navigate somewhere or do I have to implement this in the backing-beans? </p>