Scope of Manged Bean Stored During ValueExpression.setValue
Enviroment: Tomcat 6.0.10/JSF 1.2 RI
faces-config.xml:
<managed-bean>
<managed-bean-name>CurrentPartyBean</managed-bean-name>
<managed-bean-class>com.web.managedbean.PartyBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
Code snipit inside one managed bean:
publicvoid selectResult(ActionEvent e){
PartyBean partyBean =new PartyBean();
partyBean.foo();
FacesContext facesContext = FacesContext.getCurrentInstance();
ELContext elcontext = facesContext.getELContext();
ValueExpression ve = facesContext.getApplication()
.getExpressionFactory().createValueExpression(elcontext,
"#{CurrentPartyBean}", PartyBean.class);
ve.setValue(elcontext, partyBean);
...
Issue:
The bean stored in #{CurrentPartyBean} is not placed in session scope as labeled in the faces-config.xml. It seems to be placed there only for request scope and not session.
Question: What method exists for having dynamicly created managed beans adhear to the the scope as defined in the faces-config.xml file?

