title: Passing a parameter with h:commandButton
body: <p>I have a a4j:commandButton which is supposed to redirect me to an appropriate "Edit" page based on an Id, which I wanted to pass as a parameter, something like this:</p>
  
  <pre><code>&lt;h:commandButton action="/details.jsf?faces-redirect=true" value="details"&gt;
      &lt;f:attribute name="id" value="#{bean.id}" /&gt;
  &lt;/h:commandButton&gt;
  </code></pre>
  
  <p>The problem is, it doesn't work. I also tried replacing f:attribute with "f:param name="id" value="#{bean.id}" ", but it also failed. The only thing I got to work is an outputLink:</p>
  
  <pre><code>&lt;h:outputLink  value="/details.jsf"&gt;
      link
      &lt;f:param name="id" value="#{bean.id}" /&gt;
  &lt;/h:outputLink&gt;
  </code></pre>
  
  <p>But I'm not really happy with a link, so is there a way to make the commandButton work?</p>
  
  <p>Oh and I also have a bean which is supposed to get that "id" after the redirect:</p>
  
  <pre><code>@PostConstruct
  public void init(){
      id= resolve("id");
  }
  </code></pre>