I ran into the same problem and accidentally discovered that it does not work if I try to use firefox (actually icedove under linux), but works well if I try to use the built-in eclipse browser.
Even if that doesn't make sense to me, have you tried it with different browsers?
michal777 answer works very well. I added the following to this:
@ManagedProperty("#{nameBean}") private NameBean nameBean; public NameBean getNameBean() { return nameBean; } public void setNameBean(NameBean nameBean) { this.nameBean = nameBean; } public NameBean getNameBean_Workaround() { FacesContext context = FacesContext.getCurrentInstance(); return (NameBean) context.getApplication().evaluateExpressionGet(context,"#{nameBean}", NameBean.class); }
and then:
if (nameBean != null) { nameBean.setName("achsooo"); } else { getNameBean_Workaround().setName("achsooo2222"); }
Now, in the eclipse browser, "achsooo" is installed, and in icedove, "achsooo2222" is installed.
source share