ICEfaces
  1. ICEfaces
  2. ICE-7414

Customized exception handling functionality broken in 2.1-Beta

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 3.0.RC2, 3.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      -
    • Assignee Priority:
      P1

      Description

      A user has reported the following issue in 2.1-Beta:

      To handle the server errors we have made some changes in our app.

      1. Added following context parameter in the web.xml file where we have disabled the default error popups by Icefaces.

      <context-param>
      <param-name>org.icefaces.disableDefaultErrorPopups</param-name>
      <param-value>true</param-value>
      </context-param>

      2. Added server error call back listener in the main template xhtml of our app where we display a global error on UI.

      var iceErrorCallback = function iceHandleError(statusCode, responseTxt, responseDOM)
      {
      var errorMessage = '#{dict['ERROR.COMMON.GENERAL_ERROR']}'.split(':');
      var ele = document.getElementsByTagName('span');
      var i;
      for(i=0;i&lt;ele.length;i++){
      var str = ele[i].id ;
      if(str.indexOf('exceptionErrorId')!=-1){
      ele[i].innerHTML = errorMessage[1];
      }
      }
      };

      ice.onServerError(iceErrorCallback);

      As per the Icefaces documentation for the earlier releases, we need to set only above two settings to customize the exception handling. But after migrating to Icefaces 2.1.0- BETA release our customize exception handling functionality is broken. I debugged in to Icefaces bridge.js, compat.js and tmp.js and found that there are 3 call back listeners registered for server error. First from our app, 2nd from icefaces default in bridge.js and 3rd found in compat.js. The call back listener from bridge.js has check for error popup, we have set to true so it does not display any popup. The 3rd call back listener in compact.js has no check for error popup settings and it directly displays the Icefaces "Server Internal Error" popup on UI.

      I think, this is a bug in Icefaces beta. In the earlier version, this functionality used to work perfectly.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26759 Tue Dec 06 10:05:31 MST 2011 mircea.toma ICE-7414 Wire NoOp 'compat' indicators when the default error popups are disabled.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/javascript/status.js

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Tyler Johnson
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: