【发布时间】:2012-06-05 10:34:32
【问题描述】:
我在 viewscope 中有一个托管 bean,我想重置使用此范围的表单。根据这篇文章中的 Baluc Reset JSF Backing Bean(View or Session Scope)
我在我的代码中做了同样的事情:
public String reset(){
FacesContext.getCurrentInstance().getViewRoot().getViewMap().remove("myBean");
return "SamePage?faces-redirect=true";
}
但它不起作用。 有人可以告诉任何解决方案。
【问题讨论】:
-
请描述错误。 “不工作”不够具体。
标签: jsf-2