ICEfaces
  1. ICEfaces
  2. ICE-5113

Avoid forced reload when 'head' or 'html' are updated

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha1
    • Fix Version/s: 2.0-Alpha3, 2.0.0
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      server

      Description

      Rather than force a page reload (which is a non-Faces GET request and can discard user input), it should be possible to specify "head" requirements at the application level (also temporary, until we understand why adding script to the body is not sufficient).

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment -

          To detect DOM differences that reach the 'head' or 'body' elements the fix adds temporarily 'id' attributes to these elements if they're missing. By doing this the diff process will stop before reaching the 'html' element.

          The 'body' update is applied properly by the JSF bridge as long as the update will look like:
          <update id="javax.faces.ViewBody"><![CDATA[<body>.......</body>]]></update>

          The expected 'head' update looks similar:
          <update id="javax.faces.ViewHead"><![CDATA[<head>.......</head>]]></update>
          Unfortunately the update is not handled currently (JSF 2.0.2) by JSF. In the future we could bypass the 'head' level update by sending 'eval' commands back to the bridge. These code sent can modify dynamically the existing head element using other JS APIs. See:
          http://www.hunlock.com/blogs/Howto_Dynamically_Insert_Javascript_And_CSS
          http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript

          Show
          Mircea Toma added a comment - To detect DOM differences that reach the 'head' or 'body' elements the fix adds temporarily 'id' attributes to these elements if they're missing. By doing this the diff process will stop before reaching the 'html' element. The 'body' update is applied properly by the JSF bridge as long as the update will look like: <update id="javax.faces.ViewBody"><![CDATA [<body>.......</body>] ]></update> The expected 'head' update looks similar: <update id="javax.faces.ViewHead"><![CDATA [<head>.......</head>] ]></update> Unfortunately the update is not handled currently (JSF 2.0.2) by JSF. In the future we could bypass the 'head' level update by sending 'eval' commands back to the bridge. These code sent can modify dynamically the existing head element using other JS APIs. See: http://www.hunlock.com/blogs/Howto_Dynamically_Insert_Javascript_And_CSS http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript

            People

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

              Dates

              • Created:
                Updated:
                Resolved: