开发者

How to prevent the IceFaces "Connection is lost" problem

I'm using IceFaces 1.8.2 with Tomcat 6

On a irregular basis I get the message "Connection is lost" with the option to r开发者_StackOverflow中文版eload the page. This is not acceptable for a public site.

My question now is if this approach makes sense:

 Ice.onConnectionLost('document:body',
 function() {


             window.location.href=window.location.href;
        });

The idea is to reload the current page on connectin problems. Do oyu think this would solve the issue or could this create other problems (I assume that reloading the current url is OK and does not cause any workflow issues).

Thanks.


Read here Icefaces Documentation or any of the 1000+ related posts in the forums.

If it's the modal popup that's 'not acceptable', try using the OutputConnectionStatus Component


Try to put all of those

Ice.onSessionExpired('document:body', function() {
    location.reload(true);
});
Ice.onServerError('document:body', function() {
    location.reload(true);
});
Ice.onConnectionTrouble('document:body', function() {
    location.reload(true);
});
Ice.onConnectionLost('document:body', function() {
    location.reload(true);
});

and use

<ice:outputConnectionStatus styleClass="navConnectionStatus" displayHourglassWhenActive="true" showPopupOnDisconnect="false"/>

Hope it'll help

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜