title: How to pass parameters between Request-Scoped Controllers?
body: <p>I have a simple JSF-Page and want to pass a parameter from page1 to page2. 
  Every page has its own controller which is in request scope.</p>
  
  <p>The two controllers look like this:
  Controller1:</p>
  
  <pre><code>@Component("requestController1")
  @Scope("request")
  public class RequestController1 {
  
  private List&lt;Product&gt; products;
  private Product selectedProduct;
  
  @PostConstruct
  public void init() {
         //load products from db
  }
  
  public void setProducts(List&lt;Product&gt; products) {
      this.products = products;
  }
  
  public List&lt;Product&gt; getProducts() {
      return products;
  }
  
  public void setSelectedProduct(Product selectedProduct) {
      this.selectedProduct = selectedProduct;
  }
  
  public Product getSelectedProduct() {
      return selectedProduct;
  }
  </code></pre>
  
  <p>Controller2:</p>
  
  <pre><code>@Component("requestController2")
  @Scope("request")
  public class RequestController2 {
  
  private Long selectedProductId;
  
      @PostConstruct
  public void init() {
  selectedProductId = (Long) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("selectedProductId");
  }
  
      public void setSelectedProductId(Long selectedProductId) {
      this.selectedProductId = selectedProductId;
  }
  
  public Long getSelectedProductId() {
      return selectedProductId;
  }
  }
  </code></pre>
  
  <p>Now I want to navigate from page1 to page2 with passing the selectedProductId to controller2. Please note that both controllers are in request-scope and I want to use a commandButton to do the navigation.</p>
  
  <pre><code>&lt;h:commandButton value="Continue" action="requestParam2.jsf?faces-redirect=true"&gt;
                  &lt;f:param name="selectedProductId" value="#{requestController1.selectedProduct.id}"&gt;&lt;/f:param&gt;
              &lt;/h:commandButton&gt;
  </code></pre>
  
  <p>It seems that f:param does not work here. How can I achieve this?</p>