How to reload page when a button is clicked?
You can use render
attribute of a4j:commandButton
for this purpose.
Example:
<a4j:commandButton value="buttonName"
action="#{bean.action}"
render="someForm" />
In your code change render="@none"
to render="@form"
or render="@all"
.
You can use javascript
location.reload();
Or you can redirect to same URI
as in this answer.
First change commandButton to call bean method:
onConfirmComplete="#{messagesListBean.reload}"
And in the bean:
public void reload() throws IOException {
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
ec.redirect(((HttpServletRequest) ec.getRequest()).getRequestURI());
}