title: How to redirect to another page when i click on an item, in my navigation bar
body: <p>I use a navigation tool called <a href="http://www.primefaces.org/showcase/ui/dock.jsf" rel="nofollow">dock</a>, from primefaces. I need to redirect to another page when i click on one of the items. 
  The problem is that i need to find an alternative to the url attribute, this is because if i use it, the page gets redirected and the action attribute don't makes a call to the method is supposed to call.</p>
  
  <p>This is how my nav bar looks like:</p>
  
  <pre><code>&lt;h:form&gt;
          &lt;p:dock position="top"&gt;
              &lt;!--Some other menu items ...--&gt;
              &lt;p:menuitem value="Logout" icon="unsecuredimages/logout.png" action="#{securityController.logOut}" rendered ="#{!securityController.checkLogged}"/&gt;             
          &lt;/p:dock&gt;   
  &lt;/h:form&gt;
  </code></pre>
  
  <p>This is the backing bean that is called to do the logout. It works good the only problem is that i don't get redirected.</p>
  
  <pre><code>@ManagedBean
  @RequestScoped
  public class SecurityController {
  
  @EJB
  private IAuthentificationEJB authentificationEJB;
  
  public String logOut() {
          authentificationEJB.releaseUserState();
          return "main.xhtml";
      }
  ...
  </code></pre>
  
  <p>As you see i tried to return an String form the backing bean method, but doesn't work. </p>
  
  <p>Could you help me find the way to redirect when i click on the p:menuItem? </p>
  
  <p>Do you know maybe some javascript trick or something similar i can use to get redirected when i click?</p>