ICEfaces
  1. ICEfaces
  2. ICE-5613

ICEfaces requires h:head and h:body tags to properly add resources

    Details

    • Workaround Exists:
      Yes
    • Workaround Description:
      Ensure that h:head and h:body tags are present in all pages that use ICEfaces.

      Description

      There is a basic assumption with JSF 2 that when resources (typically references to JavaScript files) are targetted at areas like "head" and "body" that the page contains the actual "h:head" and "h:body" tags respectively. Without these tags, the basic ICEfaces bridge code cannot be made available. However, we have other areas of the code (e.g. ice.captureSubmit, deltaSubmit) that can add inline scripts that rely on these core resource files being available. The end result is that the scripts can get added to the page but the main files are never loaded and the browser complains that some JavaScript references (e.g. "ice") are undefined and no ICEfaces functionality is available.

      For portlets, the same basic logic holds true. Although portlets don't typically allow rendering directly to the head or body, it's the responsibility of the portlet bridge to override the standard JSF behaviour and use other means (potentially vendor specific means) to ensure that calls to render code to the head or body are handled appropriately.

      It is possible to have ICEfaces available but not want to use it on certain pages - in other words, it should be possible to mix ICEfaces and non-ICEfaces pages together within one application or portlet .war file so we need to ensure that in cases where h:head and h:body tags are not available, we don't render out any scripts that rely on resources targetted to those areas.

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21232 Thu Apr 15 11:29:52 MDT 2010 deryk.sinotte ICE-5613: adjusted loggers to resolve to class rather than package
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/context/DOMResponseWriter.java
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/event/HeadBodyListener.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21206 Mon Apr 12 16:21:35 MDT 2010 deryk.sinotte ICE-5613: adjusted logging levels and location
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/util/EnvUtils.java
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/event/BridgeSetup.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21198 Mon Apr 12 14:15:31 MDT 2010 deryk.sinotte ICE-5613: check for null rendererTypes
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/event/HeadBodyListener.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21196 Mon Apr 12 13:41:43 MDT 2010 deryk.sinotte ICE-5613: remove bad detection optimization
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/event/HeadBodyListener.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21191 Mon Apr 12 11:10:34 MDT 2010 deryk.sinotte ICE-5613: do not render out ICEfaces scripts if h:head and h:body are not present
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/resources/META-INF/faces-config.xml
          Commit graph ADD /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/event/HeadBodyListener.java
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/util/EnvUtils.java

            People

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

              Dates

              • Created:
                Updated:
                Resolved: