Reset JSF Backing Bean(View or Session Scope)

前端 未结 5 1161
南方客
南方客 2020-12-14 04:36

I want to reset by JSF backing bean when some method is invoked. Assume that there is a command button, someone press it and after succesfull transaction, my View or Session

5条回答
  •  情歌与酒
    2020-12-14 05:15

    just clear all views:

    FacesContext.getCurrentInstance().getViewRoot().getViewMap().clear();

    and remember to implements Serializable in all views

提交回复
热议问题