put indicator (like a4j:status) on h:commandButton
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 wor开发者_Go百科k with h:commandButton.
Any suggestions?
Thanks.
<h:commandButton
does not work with a4j:status
because 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();">
, where redirectBrowser()
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 button onclick
, so that the user does not click it twice.
精彩评论