Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you use Spring and JSF together it's beneficial to use Spring beans instead of JSF Managed beans. Spring beans offer almost all functionality of JSF managed beans and on top of that adds sooo many useful Spring features (AOP, proxies, weaving, MessageSources etc.).</p> <p>If you decide to use Spring beans you have to use Spring Scopes as listed in <code>WebApplicationContext</code>:</p> <pre><code>import org.springframework.context.annotation.Scope; import org.springframework.web.context.WebApplicationContext @Scope(WebApplicationContext.SCOPE_SESSION) </code></pre> <p><strong>VIEW SCOPE</strong></p> <p>There is one catch. As you can see there is no <code>SCOPE_VIEW</code> in <code>WebApplicationContext</code>. JSF 2 View scope is not yet supported in Spring. For now you have to provide your own implementation of view scope. It's not difficult: </p> <ul> <li><p>You can find <strong>instructions</strong> here:<br> <a href="https://github.com/weijiguang/OA/wiki/Spring-3-and-the-JSF-2-View-Scope(spring-2%E5%8F%8AJSF-2-bean%E4%BD%9C%E7%94%A8%E5%9F%9F)" rel="nofollow">https://github.com/weijiguang/OA/wiki/Spring-3-and-the-JSF-2-View-Scope(spring-2%E5%8F%8AJSF-2-bean%E4%BD%9C%E7%94%A8%E5%9F%9F)</a></p></li> <li><p>You can also find <strong>working implementation</strong> here:<br> <a href="https://github.com/michail-nikolaev/primefaces-spring-scopes" rel="nofollow">https://github.com/michail-nikolaev/primefaces-spring-scopes</a></p></li> <li><p>And don't forget to vote for <strong>JSF 2 View scope support in Spring</strong> here: <a href="https://jira.springsource.org/browse/SPR-6543" rel="nofollow">https://jira.springsource.org/browse/SPR-6543</a></p></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