ICEfaces
  1. ICEfaces
  2. ICE-5661

ICEfaces script elements added to the form change location causing unnecessary updates

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Alpha3, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2 JSF 2

      Description

      Using system event listeners, we automatically attach the following two <script> elements to h:forms:

      <script type='text/javascript'>ice.captureSubmit('form');</script>
      <script type='text/javascript'>ice.captureEnterKey('form');</script>

      During the initial rendering of the page, these elements are typically at the bottom of the form markup. However, during the next render phase, they are placed at the top of the form, causing the DOM diff to identify more updates than are really necessary.

        Activity

        Hide
        Deryk Sinotte added a comment -

        I've changed how we add the scripts as children of the forms from:

        form.getChildren().add(out);

        to and indexed version

        form.getChildren().add(0,out);

        so they should always appear in the same location.

        Show
        Deryk Sinotte added a comment - I've changed how we add the scripts as children of the forms from: form.getChildren().add(out); to and indexed version form.getChildren().add(0,out); so they should always appear in the same location.

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: