ICEfaces
  1. ICEfaces
  2. ICE-7964

Missing JavaScript in ICEfaces Page update

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEfaces 2.0.2
      Build number: 8
      Revision: 24561

      Apache Tomcat/7.0.26
      Eclipse Indigo Service Release 2

      Firefox 11.0
      IE 9.0
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hit F5 within the browser.

      Description

      I have this simple page:
      {code}
      <html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ice="http://www.icesoft.com/icefaces/component">
      <h:head></h:head>
      <h:body>
      <ice:form id="content_form">
      <ice:commandButton value="#{JSBean.buttonText}"
      action="#{JSBean.switchJavaScript}" />
      <ice:panelGroup id="contentForm" rendered="#{JSBean.visible}">
      <div id="myDiv">The JavaScript goes hier:</div>
      <script type="text/javascript">/* <![CDATA[ */
      alert("Hello World!");
      /* ]]> */</script>
      </ice:panelGroup>
      </ice:form>
      </h:body>
      </html>
      {code}

      And this backing bean:
      {code}
      package sample.bean;

      import javax.faces.bean.ManagedBean;
      import javax.faces.bean.SessionScoped;

      @ManagedBean(name = "JSBean")
      @SessionScoped
      public class JavaScriptBean {
          private boolean isVisible = false;

          public void switchJavaScript() {
              isVisible = !isVisible;
          }

          public String getButtonText() {
              return isVisible() ? "Hide" : "Show";
          }

          public boolean isVisible() {
              return isVisible;
          }
      }
      {code}

      The issue:
      Loading the page the first time the JavaScript is hidden due to the panelGroup which is not rendered. But after I hit the button to "Show" the JavScript the panelGroup is rendered indeed but I miss the JavaScript tag at all. That's the output of Firebug:

      {code}
      <div id="content_form:contentForm" class="icePnlGrp">
          <div id="myDiv">The JavaScript goes hier:</div>
      </div>
      {code}

        Activity

        Hide
        Marcel added a comment -

        The issue exists on the following configuration as well:
        ICEfaces 3.0.1
        Build number: 7
        Revision: 28541
        JSF Mojarra 2.1.6

        Show
        Marcel added a comment - The issue exists on the following configuration as well: ICEfaces 3.0.1 Build number: 7 Revision: 28541 JSF Mojarra 2.1.6

          People

          • Assignee:
            Unassigned
            Reporter:
            Marcel
          • Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: