ICEfaces
  1. ICEfaces
  2. ICE-5667

PushRenderer.removeCurrentSession has no effect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Beta1, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2.0
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      A workaround is to call addCurrentSession() with an otherwise unused group so that the session is always a member of at least one group (even if that group does not receive push updates).
      Show
      A workaround is to call addCurrentSession() with an otherwise unused group so that the session is always a member of at least one group (even if that group does not receive push updates).

      Description

      I'm having quite a time trying to get PushRenderer functionality to work properly. Specifically, when calling removeCurrentSession("group") to stop render updates to "group" it appears to do nothing.

        Activity

        Hide
        Ted Goddard added a comment -

        removeCurrentSession() is working as expected, however, "lazy" push initialization is removing itself too aggressively from the page and it may appear that the feature is not functional. For instance, in a simple test with "auction" removeCurrentSession() was invoked, but the push updates for the clock continued and the page appeared to blink briefly. This is caused by the push initialization JavaScript being removed from the page, resulting in a DOM diff that includes the HEAD or the BODY, causing a page reload. The page reload triggers the construction of a new ViewScope bean, adding the session to the "auction" group again.

        A workaround is to call addCurrentSession() with an otherwise unused group so that the session is always a member of at least one group (even if that group does not receive push updates).

        Show
        Ted Goddard added a comment - removeCurrentSession() is working as expected, however, "lazy" push initialization is removing itself too aggressively from the page and it may appear that the feature is not functional. For instance, in a simple test with "auction" removeCurrentSession() was invoked, but the push updates for the clock continued and the page appeared to blink briefly. This is caused by the push initialization JavaScript being removed from the page, resulting in a DOM diff that includes the HEAD or the BODY, causing a page reload. The page reload triggers the construction of a new ViewScope bean, adding the session to the "auction" group again. A workaround is to call addCurrentSession() with an otherwise unused group so that the session is always a member of at least one group (even if that group does not receive push updates).
        Hide
        Ted Goddard added a comment -

        removeCurrentSession() should not result in page changes that require a full page update to apply.

        Show
        Ted Goddard added a comment - removeCurrentSession() should not result in page changes that require a full page update to apply.
        Hide
        Ted Goddard added a comment -

        This may be due to icepush.js being removed from the head immediately when no groups are present.

        Show
        Ted Goddard added a comment - This may be due to icepush.js being removed from the head immediately when no groups are present.
        Hide
        Mircea Toma added a comment -

        This issue was fixed by the resolution of ICE-5707. When push is enabled or disabled lazily it is not forcing a page reload anymore.

        Show
        Mircea Toma added a comment - This issue was fixed by the resolution of ICE-5707 . When push is enabled or disabled lazily it is not forcing a page reload anymore.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: