ICEfaces
  1. ICEfaces
  2. ICE-10826

ace:submitMonitor - Add support for displaying error messages asynchronously

    Details

      Description

      When using the ace:submitMonitor the error messages/labels are only shown on user interaction. If there an active push connection these messages should be shown asynchronously like the default error messages/popups are.
      1. Case13474Example.zip
        21 kB
        Arran Mccullough
      2. Case13474ExampleWAR.zip
        9.16 MB
        Arran Mccullough

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case that shows this issue.

        Steps:

        • Load welcomeICEfaces.jsf
        • The app is set with a 1 min session timeout.
        • After 1 min, click the Submit button and the sessionExpiredLabel is shown.
        • This message should be shown when the session expires asynchronously.
        • Similar behavior can be seen with the networkErrorLabel once the connection to the server is shut down.
        Show
        Arran Mccullough added a comment - Attached test case that shows this issue. Steps: Load welcomeICEfaces.jsf The app is set with a 1 min session timeout. After 1 min, click the Submit button and the sessionExpiredLabel is shown. This message should be shown when the session expires asynchronously. Similar behavior can be seen with the networkErrorLabel once the connection to the server is shut down.
        Hide
        Mircea Toma added a comment -

        Register ace:submitMonitor callbacks with ice.onSessionExpiry and ice.onBlockingConnectionLost to get notified asynchronously when session expires or blocking connection is down.

        Show
        Mircea Toma added a comment - Register ace:submitMonitor callbacks with ice.onSessionExpiry and ice.onBlockingConnectionLost to get notified asynchronously when session expires or blocking connection is down.
        Hide
        Carmen Cristurean added a comment - - edited

        IF4 trunk r46925/46926:
        A browser console error occurred when pressing the Submit button on the attached test case.
        TypeError: cleanupCallbacks[i] is not a function
        http://localhost:8080/10826/javax.faces.resource/submitmonitor/submitmonitor.js.jsf?ln=icefaces.ace&v=4_1_0_151229
        Line 344

        Not an issue if using the ICEfaces 4.1.0 release libraries.

        A new JIRA was created for the browser console error that was seen also on submitMonitor demos in showcase w/ProjectStage=Development: ICE-10917.

        Show
        Carmen Cristurean added a comment - - edited IF4 trunk r46925/46926: A browser console error occurred when pressing the Submit button on the attached test case. TypeError: cleanupCallbacks [i] is not a function http://localhost:8080/10826/javax.faces.resource/submitmonitor/submitmonitor.js.jsf?ln=icefaces.ace&v=4_1_0_151229 Line 344 Not an issue if using the ICEfaces 4.1.0 release libraries. A new JIRA was created for the browser console error that was seen also on submitMonitor demos in showcase w/ProjectStage=Development: ICE-10917 .
        Hide
        Ken Fyten added a comment -

        Re-opened for regression issue with submitMonitor.

        Show
        Ken Fyten added a comment - Re-opened for regression issue with submitMonitor.
        Hide
        Mircea Toma added a comment -

        The issue was caused by the ICEpush registration functions that are now used by ice:submitMonitor, functions that return null instead of de-registration callbacks that the submit monitor tries to invoke.

        Modified ICEpush callback registration functions (such as ice.onblockingConnectionLost ) to return de-registration callback just as ICEfaces callback registration functions do.

        Show
        Mircea Toma added a comment - The issue was caused by the ICEpush registration functions that are now used by ice:submitMonitor , functions that return null instead of de-registration callbacks that the submit monitor tries to invoke. Modified ICEpush callback registration functions (such as ice.onblockingConnectionLost ) to return de-registration callback just as ICEfaces callback registration functions do.
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces 4 trunk r46945 using attached test case.
        The fix is verified when using Chrome 47 and FF 43.
        When testing with IE 11, 10, 9 the messages are not displayed asynchronously and there is a browser console error:

        [icepush.6e6c5] [Thu, 07 Jan 2016 17:45:52 GMT] failed to listen for updates TypeError: Object doesn't support property or method 'split'
           "[icepush.6e6c5] [Thu, 07 Jan 2016 17:45:52 GMT] failed to listen for updates"
           {
              [functions]: ,
              __proto__: { },
              description: "Object doesn't support property or method 'split'",
              message: "Object doesn't support property or method 'split'",
              name: "TypeError",
              number: -2146827850,
              stack: "TypeError: Object doesn't support property or method 'split'
           at split (http://localhost:8080/Case13474Example/javax.faces.resource/bridge-support.uncompressed.js.jsf?ln=ice.core&v=4_1_0_160107:339:9)
           at selectWindowNotifications (http://localhost:8080/Case13474Example/javax.faces.resource/icepush.uncompressed.js.jsf?ln=ice.push&v=4_1_0_160107:1056:21)
           at Anonymous function (http://localhost:8080/Case13474Example/javax.faces.resource/icepush.uncompressed.js.jsf?ln=ice.push&v=4_1_0_160107:623:17)"
           }
        
        Show
        Liana Munroe added a comment - Tested with ICEfaces 4 trunk r46945 using attached test case. The fix is verified when using Chrome 47 and FF 43. When testing with IE 11, 10, 9 the messages are not displayed asynchronously and there is a browser console error: [icepush.6e6c5] [Thu, 07 Jan 2016 17:45:52 GMT] failed to listen for updates TypeError: Object doesn't support property or method 'split' "[icepush.6e6c5] [Thu, 07 Jan 2016 17:45:52 GMT] failed to listen for updates" { [functions]: , __proto__: { }, description: " Object doesn't support property or method 'split'" , message: " Object doesn't support property or method 'split'" , name: "TypeError" , number: -2146827850, stack: "TypeError: Object doesn't support property or method 'split' at split (http: //localhost:8080/Case13474Example/javax.faces.resource/bridge-support.uncompressed.js.jsf?ln=ice.core&v=4_1_0_160107:339:9) at selectWindowNotifications (http: //localhost:8080/Case13474Example/javax.faces.resource/icepush.uncompressed.js.jsf?ln=ice.push&v=4_1_0_160107:1056:21) at Anonymous function (http: //localhost:8080/Case13474Example/javax.faces.resource/icepush.uncompressed.js.jsf?ln=ice.push&v=4_1_0_160107:623:17)" }
        Hide
        Mircea Toma added a comment -
        Show
        Mircea Toma added a comment - This last error is caused by a commit for NTFY-282. The regression is now captured here: http://jira.icesoft.org/browse/NTFY-282?focusedCommentId=62099&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-62099 .
        Hide
        Mircea Toma added a comment -

        Marking this as resolved.

        Show
        Mircea Toma added a comment - Marking this as resolved.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: