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

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Salesforce Case [5007000000JMZG2]
        Description 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, compact.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 compact.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.
        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.
        Tyler Johnson made changes -
        Description 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.
        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.
        Mircea Toma made changes -
        Assignee Mircea Toma [ mircea.toma ]
        Ken Fyten made changes -
        Fix Version/s 2.1 [ 10241 ]
        Ken Fyten made changes -
        Assignee Priority P1
        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
        Hide
        Ken Fyten added a comment -

        Mircea, please retest with latest trunk asap.

        Show
        Ken Fyten added a comment - Mircea, please retest with latest trunk asap.
        Hide
        Mircea Toma added a comment -

        Wire NoOp 'compat' indicators when the default error popups are disabled.

        Show
        Mircea Toma added a comment - Wire NoOp 'compat' indicators when the default error popups are disabled.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 3.0.RC2 [ 10313 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: