This content has been marked as final.
Show 5 replies
-
1. Re: Handling bad connections
ilya_shaikovsky Feb 5, 2009 4:55 AM (in response to yoghoyogho)our components has ontimeout attribute. Event fired when the request timed out.
-
2. Re: Handling bad connections
yoghoyogho Feb 5, 2009 5:16 AM (in response to yoghoyogho)That's a blazing fast reply :-)
Let me be more specific:<a4j:form id="orderForm" ajaxSubmit="true"> <a4j:status id="orderStatus" onstart="showStatusModal();" onstop="hideStatusModal();"/> <a4j:jsFunction name="sendOrderValue" action="#{orderBean.orderArticle}" reRender="articlePanel"> <a4j:actionparam name="count" assignTo="#{orderBean.count}"/> <a4j:actionparam name="item" assignTo="#{orderBean.item}"/> </a4j:jsFunction> </a4j:form>
Where would ontimeout need to be inserted? I ask this, because I don't see ontimeout documented for both a4j:form as a4j:jsFunction -
3. Re: Handling bad connections
ilya_shaikovsky Feb 5, 2009 5:20 AM (in response to yoghoyogho)sorry for confusing you.. Thinked about timeout attribute.. Now will check and clarify..
-
4. Re: Handling bad connections
ilya_shaikovsky Feb 5, 2009 5:36 AM (in response to yoghoyogho)I've used timeout on command button defined to 1000mls and in the button action used thread.sleep(3000); to simulate the timout.
for this case out standard error handlers described in documentation "basic concepts" section works fine:<script type="text/javascript"> A4J.AJAX.onError = function(req, status, message){ window.alert(status + message); } </script>
500 Request timeout alert appears. You could redefined the handler code with any you need. -
5. Re: Handling bad connections
yoghoyogho Feb 5, 2009 5:48 AM (in response to yoghoyogho)This was exactly what I was looking for. I've tried it and it works. Thanks a lot!