I have a page called newTest.xhtml, backed by A CDI Bean called NewTest, When the user clicks a button it should do some work in the backinhg bean and return to the same page newTest.xhtml. The problem is that When I click the button the browser does not refresh the page. when I click refresh manually then the browser refresh the page. My Question is : In JSF how Can I tell the browser to ALWAYS Load the page from the server not the cache
public String doWork() {
//do some work
return "/newTest.xhtml?faces-redirect=true";
}
Fixed I have fixed The problem by using ajax's render="@all"
<h:commandButton >
<f:ajax execute="@all" render="@all"/>
</h:commandButton>