Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The legacy JSP expression <code>${}</code> does not auto create JSF managed beans if they do not exist in the scope yet. You need the JSF expression <code>#{}</code> instead. Even more, you should <em>stop</em> using the legacy JSP expression <code>${}</code> in JSF pages to avoid future confusion and maintenance trouble. The JSF expression <code>#{}</code> does exactly the same and more (namely, auto creating JSF managed beans and setting model values via input components).</p> <pre class="lang-html prettyprint-override"><code>&lt;table&gt; &lt;c:forEach var="product" items="#{productsBean.products}"&gt; &lt;tr&gt; &lt;td&gt;#{product.description}&lt;/td&gt; &lt;/tr&gt; &lt;/c:forEach&gt; &lt;/table&gt; </code></pre> <h3>See also:</h3> <ul> <li><a href="https://stackoverflow.com/questions/4812755/difference-between-jsp-el-jsf-el-and-unified-el">Difference between JSP EL, JSF EL and Unified EL</a></li> </ul> <hr> <p><strong>Unrelated</strong> to the concrete problem, have you considered using <code>&lt;h:dataTable&gt;</code> instead? It saves you from fiddling with loose HTML <code>&lt;table&gt;</code>, <code>&lt;tbody&gt;</code>, <code>&lt;tr&gt;</code>, <code>&lt;th&gt;</code> and <code>&lt;td&gt;</code> tags.</p> <pre class="lang-html prettyprint-override"><code>&lt;h:dataTable value="#{productsBean.products}" var="product"&gt; &lt;h:column&gt;#{product.description}&lt;/h:column&gt; &lt;/h:dataTable&gt; </code></pre> <h3>See also:</h3> <ul> <li><a href="https://stackoverflow.com/questions/8459903/jsf-application-correct-use-of-session-scope/8464636#8464636">Creating master-detail pages for entities, how to link them and which bean scope to choose</a> -- Just the code example</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload