Consider this example
@Scope(ScopeType.SESSION)
@Name("test")
@BypassInterceptors
public Class Test {
@Unwrap
public List<String> test() {
//do a long and major calculation and return the List
}
}
Then you have a view and you are getting your list
<h:selectOneMenu value="#{someBean.text}">
<s:selectItems value="#{test}"/>
</h:selectOneMenu>
Now in my opinion, because I have Scope session, the list should be cached, or the Seam manager component at least, so that it will run once, but then when you revisit the page in the same session, it should not run again, but when I re-enter the page the Unwrap method is yet again run.
So my question is, what is the difference between Session scope and say Event scope here?
To circumvent this I have manually cached the list in the session context and retrieve it from the context if it is present in the @Unwrap
method