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

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000T6mSmAAJ
        Ken Fyten made changes -
        Assignee Mircea Toma [ mircea.toma ]
        Fix Version/s EE-3.3.0.GA [ 10572 ]
        Fix Version/s 3.4 [ 10770 ]
        Affects Version/s 3.1 [ 10312 ]
        Assignee Priority P2 [ 10011 ]
        Component/s Framework [ 10013 ]
        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.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34907 Wed May 08 16:40:36 MDT 2013 mircea.toma ICE-9239 Modified the tag handler to read its attributes as value expression if defined so.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/facelets/tag/icefaces/core/RefreshHandler.java
        Ken Fyten made changes -
        Assignee Priority P2 [ 10011 ] P1 [ 10010 ]
        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.
        Tyler Johnson made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Tyler Johnson made changes -
        Attachment sf-12150.war [ 15995 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #35657 Thu May 30 10:39:00 MDT 2013 mircea.toma ICE-9239 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.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/facelets/tag/icefaces/core/RefreshHandler.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/util/CoreUtils.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/util/ComponentUtils.java
        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.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #35664 Thu May 30 15:17:28 MDT 2013 nils.lundquist ICE-9239 - Switched to in-flow layout. Aligns correctly with any font size (though 10pt font is currently set). Doesn't require rime specific style.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/templates/content-template.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/templates/main-template.xhtml
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: