Hi
I've tried updating JBoss 5.0.1 to 5.1.0.GA, but my JSF application fails, because of a utility method used on almost every page is no longer working.
The utility method is using a value expression to set a managed bean into its proper scope after a search request has been performed.
I.e.
MyManagedBean bean = search(inputvalues);
setManagedBean("fooBean", bean);
And the utility method implementation:
public static <T> void setManagedBean(String binding, T bean) {
FacesContext ctx = FacesContext.getCurrentInstance();
ELContext elCtx = ctx.getELContext();
ExpressionFactory factory = ctx.getApplication().getExpressionFactory();
String exp = "#{"+binding+"}";
ValueExpression valueExp = factory.createValueExpression(elCtx, exp, bean.getClass());
valueExp.setValue(elCtx, bean);
}
What happens upon execution is that an empty instance of MyManagedBean is inserted, i.e. all field values are gone. Does anyone have a clue on why this behavior occures now?
We have created a basic JSF 1.2 web application compiled against JSF RI 1.2_08 and packaged with Facelets 1.1.15.B1 and Richfaces 3.3.1.GA.
It seems that JBoss 5.1 executes with Mojarra 1.2_12-b01-FCS, is that a change?
JDK version is 1.6.0_22
Feel free to ask any questions if I left out important information.
/Jesper
I have the same problem with Mojarra 1.2_12-. Workaround is to getValue from the ${myManagedBean} first that will create a new instance, then set the new value. very bad: waste memory and GC overhead. It is a bug, i think.