ICEfaces
  1. ICEfaces
  2. ICE-9239

Make icecore:refresh interval attribute dynamically configurable

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      -
    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description

      The icecore:refresh tag doesn't allow EL expressions for the interval. A user may have a scenario where they would like to have dynamic refresh times (more frequent in certain circumstances). We should add the ability to dynamically configure the interval attribute.

        Activity

        Hide
        Mircea Toma added a comment -

        Modified RefrershHandler tag handler to read its attributes as value expression if defined so.

        Show
        Mircea Toma added a comment - Modified RefrershHandler tag handler to read its attributes as value expression if defined so.
        Hide
        Tyler Johnson added a comment -

        Although the interval can now be set via EL, the refresh rate itself is not changing as expected. Here is what I am seeing:

        1. Default interval set to 5 seconds. Clicking the commandButton changes the interval to 1 second which works expected as the refresh rate speeds up. However, you cannot revert back to the 5 second refresh rate.

        2. Default interval set to 1 second. Clicking the commandButton to change the interval to 5 seconds does not alter the refresh rate.

        Test case attached.

        Show
        Tyler Johnson added a comment - Although the interval can now be set via EL, the refresh rate itself is not changing as expected. Here is what I am seeing: 1. Default interval set to 5 seconds. Clicking the commandButton changes the interval to 1 second which works expected as the refresh rate speeds up. However, you cannot revert back to the 5 second refresh rate. 2. Default interval set to 1 second. Clicking the commandButton to change the interval to 5 seconds does not alter the refresh rate. Test case attached.
        Hide
        Mircea Toma added a comment -

        There were two problems that created this issue:

        • The RefreshSetupOutput.encodeBegin was not marking the root element as being a onElementUpdate user. Because of this the ice.onElementUpdate callback in the client responsible for terminating the refresh thread was not invoked when the refresh interval was changed. The result was that both the 1 second and 5 seconds refresh thread were running after clicking on the "Toggle Interval" button.
        • The RefreshSetupOutput.encodeEnd method was not overriden with no-op method causing the UIOutput to render and additional 'span' end tag. The correction mechanism in our DOMResponseWriter would just add the 'span' element. This resulted in having to 'span' element with the same ID in the document thus confusing the onElementUpdate feature.
        Show
        Mircea Toma added a comment - There were two problems that created this issue: The RefreshSetupOutput.encodeBegin was not marking the root element as being a onElementUpdate user. Because of this the ice.onElementUpdate callback in the client responsible for terminating the refresh thread was not invoked when the refresh interval was changed. The result was that both the 1 second and 5 seconds refresh thread were running after clicking on the "Toggle Interval" button. The RefreshSetupOutput.encodeEnd method was not overriden with no-op method causing the UIOutput to render and additional 'span' end tag. The correction mechanism in our DOMResponseWriter would just add the 'span' element. This resulted in having to 'span' element with the same ID in the document thus confusing the onElementUpdate feature.
        Hide
        Mircea Toma added a comment -

        Changed RefreshSetupOutput.encodeBegin to mark the root element as onElementUpdate enabled so that server-side onElementUpdate implementation works properly. Also, overriden RefreshSetupOutput.encodeEnd with empty body method so that a 'span' end tag is not rendered by the inherited UIOuput component.

        Show
        Mircea Toma added a comment - Changed RefreshSetupOutput.encodeBegin to mark the root element as onElementUpdate enabled so that server-side onElementUpdate implementation works properly. Also, overriden RefreshSetupOutput.encodeEnd with empty body method so that a 'span' end tag is not rendered by the inherited UIOuput component.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: