ICEfaces
  1. ICEfaces
  2. ICE-4457

Error in example code demonstrating the bridge connection status events

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: Documentation
    • Labels:
      None
    • Environment:
      Using: ff 3.0.10 and ie7.0.6001.18000
      Server: Tomcat 6.0.18
      ICEFaces: 1.8.0
      IDE: MyEclipse Enterprise 7.1.1-20090310
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Removing the whole id tag from the body element works:

      <body>
      <script type="text/javascript">
      Ice.onSessionExpired('document:body', function() {
      alert('Session has expired!');
      });
      </script>
      Show
      Removing the whole id tag from the body element works: <body> <script type="text/javascript"> Ice.onSessionExpired('document:body', function() { alert('Session has expired!'); }); </script>

      Description

      I think there is a bug in the documentation:
      "IceFacesDeveloperGuide.pdf" v1.8

      In the Javascript section on page 28.

      The example code does not work. It throws an exception: javax.faces.FacesException: java.lang.IllegalArgumentException: document:body

      Here is the code:

      <body id="document:body">
      <script type="text/javascript">
      Ice.onSessionExpired('document:body', function() {
      alert('Session has expired!');
      });
      </script>

      When I remove the whole id tag from the body element it works:

      <body>
      <script type="text/javascript">
      Ice.onSessionExpired('document:body', function() {
      alert('Session has expired!');
      });
      </script>

      Just removing the colon (:) from body id tag will also NOT work, because then you will get an JavaScript error:
      Error: H.asElement() is null
      Source File: http://localhost/xmlhttp/1241601129027/icefaces-d2d.js
      Line: 36

      Maybe You should adjust your documentation.
      But maybe I'm wrong.

        Activity

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Uei Liece
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: