JSF pass through elements can't send objects
<p>I'm using JSF pass through element, and i want to send to my Bean an entire object, but when i do i get null.</p>

<p>I'm doing something like this:</p>

<pre><code>&lt;f:metadata&gt;
&lt;f:viewParam    id="id" name="id" value="#{productDetailBean.id}"/&gt;
&lt;f:viewAction   action="#{productDetailBean.loadBook()}"/&gt;              
</code></pre>

<p></p>

<pre><code>&lt;form jsf:id="form" method="post" class="container"&gt;
            &lt;ul id="variants" class="clearfix"&gt;
                &lt;li class="buy-option"&gt;&lt;input type="radio" name="id"
                    class="variant-radio"
                    id="product-variant-#{productDetailBean.book.id}"
                    value="#{productDetailBean.book.id}" checked="checked" /&gt; 
                    &lt;label class="variant-label"
                    for="product-variant-#{productDetailBean.book.id}"&gt; E-book
                        + Impresso &lt;/label&gt;
                    &lt;small class="compare-at-price"&gt;R$ #{productDetailBean.book.price}&lt;/small&gt;
                    &lt;p class="variant-price"&gt;R$ #{productDetailBean.book.price}&lt;/p&gt;
                &lt;/li&gt;
            &lt;/ul&gt;

            &lt;button type="submit" jsf:action="#{shoppingCartBean.add(productDetailBean.id)}" class="submit-image icon-basket-alt"
                title="#{productDetailBean.book.title}"&gt;Comprar&lt;/button&gt;
</code></pre>

<p></p>

<p>And my Bean:</p>

<pre><code>public String add(Integer id){
    Book book = bookDao.search(id);
    ShoppingItem shoppingItem = new ShoppingItem(book);
    shoppingCart.add(shoppingItem);
    return "/site/carrinho?faces-redirect=true";
}
</code></pre>

<p>I would like to do the following:</p>

<pre><code>&lt;button type="submit" jsf:action="#{shoppingCartBean.add(productDetailBean.book)}" class="submit-image icon-basket-alt"
                title="#{productDetailBean.book.title}"&gt;Comprar&lt;/button&gt;
</code></pre>

<p>And the bean:</p>

<pre><code>public String add(Book book){
    ShoppingItem shoppingItem = new ShoppingItem(book);
    shoppingCart.add(shoppingItem);
    return "/site/carrinho?faces-redirect=true";
}
</code></pre>

<p>But when i do it, i get a null book, is it possible to do it?</p>