jsf 2 - Reset JSF Backing Bean of Viewscope -


i have 1 managed bean in viewscope want reset form using scope. according baluc post reset jsf backing bean(view or session scope)
did same in code :

    public string reset(){          facescontext.getcurrentinstance().getviewroot().getviewmap().remove("mybean");         return "samepage?faces-redirect=true";       } 

but not working. can tell solution .

try this

public void reset(){       facescontext.getcurrentinstance().getviewroot().getviewmap().remove("mybean");  } 

or this

public string reset(){       return "samepage";   } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -