In JSF Java Script ausschalten

Basti54

Erfahrenes Mitglied
Morgen, Gemeinde.

Arbeite mich grad in JSF ein. Tolle Sache, nur leider generiert das Teil JavaScript. Das soll nich sein, da ich es eh nicht brauche!
z.B.:
Code:
<script type="text/javascript">
  <!--  function getScrolling() {
      var x = 0; var y = 0;     
 if (document.body && document.body.scrollLeft && !isNaN(document.body.scrollLeft)) {
          x = document.body.scrollLeft;      
} else if (window.pageXOffset && !isNaN(window.pageXOffset)) { 
         x = window.pageXOffset;  
    }      
if (document.body && document.body.scrollTop && !isNaN(document.body.scrollTop)) {  
        y = document.body.scrollTop; 
     } else if (window.pageYOffset && !isNaN(window.pageYOffset)) {          y = window.pageYOffset;      }   
   return x + "," + y;  } 
 //-->
  </script>
In der web.xml ist alles, was mit Java Script zu tun hat auf false gestellt. Trotzdem kommt's.
Wie kann ich das abschalten
 
Hab's.
Das muss in die web.xml:
Code:
    <context-param>
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>false</param-value>
        <description>
            This parameter tells MyFaces if javascript code should be allowed in the
            rendered HTML output.
            If javascript is allowed, command_link anchors will have javascript code
            that submits the corresponding form.
            If javascript is not allowed, the state saving info and nested parameters
            will be added as url parameters.
            Default: "true"
        </description>
    </context-param>
    
    <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
        <description>
            This parameter tells MyFaces if javascript code should be allowed in the
            rendered HTML output.
            If javascript is allowed, command_link anchors will have javascript code
            that submits the corresponding form.
            If javascript is not allowed, the state saving info and nested parameters
            will be added as url parameters.
            Default: "false"

            Setting this param to true should be combined with STATE_SAVING_METHOD "server" for
            best results.

            This is an EXPERIMENTAL feature. You also have to enable the detector filter/filter mapping below to get
            JavaScript detection working.
        </description>
    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
        <param-value>false</param-value>
        <description>
            If true, rendered HTML code will be formatted, so that it is "human readable".
            i.e. additional line separators and whitespace will be written, that do not
            influence the HTML code.
            Default: "true"
        </description>
    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
        <param-value>false</param-value>
        <description>
            If true, a javascript function will be rendered that is able to restore the
            former vertical scroll on every request. Convenient feature if you have pages
            with long lists and you do not want the browser page to always jump to the top
            if you trigger a link or button action that stays on the same page.
            Default: "false"
        </description>
    </context-param>
 

Neue Beiträge

Zurück