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

          Mircea Toma created issue -
          Mircea Toma made changes -
          Field Original Value New Value
          Salesforce Case []
          Component/s Bridge [ 10011 ]
          Component/s Framework [ 10013 ]
          Deryk Sinotte made changes -
          Salesforce Case []
          Fix Version/s 2.0-Alpha3 [ 10032 ]
          Assignee Mircea Toma [ mircea.toma ]
          Deryk Sinotte made changes -
          Link This issue blocks ICE-5660 [ ICE-5660 ]
          Deryk Sinotte made changes -
          Link This issue blocks ICE-5659 [ ICE-5659 ]
          Deryk Sinotte made changes -
          Link This issue is duplicated by ICE-5682 [ ICE-5682 ]
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Priority P1
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21363 Wed May 05 15:39:27 MDT 2010 mircea.toma ICE-5113 Send JSF specific DOM updates when 'head' or 'body' element is reached during the DOM diffing process.
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/context/DOMPartialViewContext.java
          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
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 2.0.0 [ 10230 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1

            People

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

              Dates

              • Created:
                Updated:
                Resolved: