Hello folks, i´d like to update a hidden field to 1 every time a ajax request is called in my page and set the same field with 0 when its completed.
Something like this:
<h:form>
<a4j:support reRender="hdnAjaxRequestActive#{name}"
onsubmit="document.getElementById( '#{name}Form:hdnAjaxRequestActive#{name}' ).value = 'true';"
oncomplete="document.getElementById( '#{name}Form:hdnAjaxRequestActive#{name}' ).value = 'false';" />
<h:inputHidden id="hdnAjaxRequestActive#{name}" value=""/>
</h:form>
My problem here is with that approach, no ajax is processed at all! What should i do?
PS: i doing this to create a kind of waitForAjax method in my selenium tests!
Regards,
Edson