We are using Richfaces 3.3.3.Final. Our problem is about navigation problem on a4j:commandButton. I know that navigation is not working properly if we use a4j:commandButton (please visit : http://community.jboss.org/wiki/CommonAjaxRequestsProblems#navigation).
Ok I understand that I have to use h:commandButton in order to navigation works properly. But now I need an indicator component which will work with h:commandButton. <a4j:status> doesn’t work with h:commandButton.
Any suggestions?
Thanks.
<h:commandButtondoes not work witha4j:statusbecause it does not fire any ajax request – it fires a regular request. And it does not make sense to navigate the browser with ajax.It appears you want to show work-in-progress when navigating. This is not possible in http in general – you either request a new page and wait for it to come, or make an ajax request.
But you can do another thing – use
<a4j:commandButton oncomplete="redirectBrowser();">, whereredirectBrowser()is a javascript function that changes the current url:window.href.location=/desired/target.jsf'. It will be triggered when the ajax response comes back. In addition, you can disable the buttononclick, so that the user does not click it twice.