4 Replies Latest reply on Apr 22, 2008 12:56 PM by Lotfi Mellouk

    [rich:tabpanel]  JS error on load  within IE7

    Lotfi Mellouk Master

      hello,

      I have a strange JS error; I use rich:tabPanel as a menu navigation,
      the first page loaded generate JS error on IE7;
      RichFaces undefined, LOG udnefined

      when I load only the page /menu.jsf, I dont get the error, but the erro occurs on the first page, even this not include JSF or rich faces code:

      here the menu.xhtml code:

      <ui:composition xmlns="http://www.w3.org/1999/xhtm"
       xmlns:ui="http://java.sun.com/jsf/facelet"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich">
      <rich:panel>
      <f:facet name="header">
      <h:outputText value="TEST"></h:outputText>
      </f:facet>
      <h:form>
      <rich:tabPanel switchType="client">
      <rich:tab label="First">
      <h:outputText value="Here is tab#1" />
      </rich:tab>
      <rich:tab label="Second">
      <h:outputText value="Here is tab#2" />
      </rich:tab>
      <rich:tab label="Third">
      <h:outputText value="Here is tab#3" />
      </rich:tab>
      </rich:tabPanel>
      <a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
      </h:form>
       </rich:panel>
      </ui:composition>


      the index.xhtml page:

      <ui:composition template="/layout/template.xhtml"
       xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:t="http://myfaces.apache.org/tomahawk">
       <ui:define name="title">Home</ui:define>
       <ui:define name="body">
      
       </ui:define>
      </ui:composition>



      thanks for help!!

        • 1. Re: [rich:tabpanel]  JS error on load  within IE7
          Lotfi Mellouk Master

          the problem concern the generated line below

          <script type="text/javascript"><!--
          RichFaces.panelTabs['_id27:_id30']=[{'cellInactiveClass':'dr-tbpnl-tbcell-inact rich-tabhdr-cell-inactive','id':'_id27:_id31','ontabenter':'','ontableave':'','cellActiveClass':'dr-tbpnl-tbcell-act rich-tabhdr-cell-active','activeClass':'dr-tbpnl-tb rich-tab-header dr-tbpnl-tb-act rich-tab-active ','inactiveClass':'dr-tbpnl-tb rich-tab-header dr-tbpnl-tb-inact rich-tab-inactive ','name':'_id31'} ,{'cellInactiveClass':'dr-tbpnl-tbcell-inact rich-tabhdr-cell-inactive','id':'_id27:_id33','ontabenter':'','ontableave':'','cellActiveClass':'dr-tbpnl-tbcell-act rich-tabhdr-cell-active','activeClass':'dr-tbpnl-tb rich-tab-header dr-tbpnl-tb-act rich-tab-active ','inactiveClass':'dr-tbpnl-tb rich-tab-header dr-tbpnl-tb-inact rich-tab-inactive ','name':'_id33'} ,{'cellInactiveClass':'dr-tbpnl-tbcell-inact rich-tabhdr-cell-inactive','id':'_id27:_id35','ontabenter':'','ontableave':'','cellActiveClass':'dr-tbpnl-tbcell-act rich-tabhdr-cell-active','activeClass':'dr-tbpnl-tb rich-tab-header dr-tbpnl-tb-act rich-tab-active ','inactiveClass':'dr-tbpnl-tb rich-tab-header dr-tbpnl-tb-inact rich-tab-inactive ','name':'_id35'} ] ;
          //--></script>
          


          • 2. Re: [rich:tabpanel]  JS error on load  within IE7
            Lotfi Mellouk Master

            hi guys..

            I get identical problem on page with modalPanel,
            when I set redirect="true" on the faces-config navigation rule, it works without any javascript error..

            wath's wrong ? forget i some thing on richfaces configuration??

            thnaks a lot..

            • 3. Re: [rich:tabpanel]  JS error on load  within IE7
              Ilya Shaikovsky Master

              show your web.xml
              what is your RF version?

              • 4. Re: [rich:tabpanel]  JS error on load  within IE7
                Lotfi Mellouk Master

                sorry for delay
                here is web.xml

                RF version was 3.1.4.GA..

                <?xml version="1.0" encoding="UTF-8"?>
                <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
                 <display-name>Archetype Created Web Application</display-name>
                 <context-param>
                 <param-name>javax.faces.CONFIG_FILES</param-name>
                 <param-value>/WEB-INF/faces-config.xml</param-value>
                 </context-param>
                 <context-param>
                 <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                 <param-value>.xhtml</param-value>
                 </context-param>
                 <!-- Special Debug Output for Development -->
                 <context-param>
                 <param-name>facelets.DEVELOPMENT</param-name>
                 <param-value>true</param-value>
                 </context-param>
                 <!-- Optional JSF-RI Parameters to Help Debug -->
                 <context-param>
                 <param-name>com.sun.faces.validateXml</param-name>
                 <param-value>true</param-value>
                 </context-param>
                 <context-param>
                 <param-name>facelets.LIBRARIES</param-name>
                 <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
                 </context-param>
                 <context-param>
                 <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                 <param-value>server</param-value>
                 </context-param>
                 <context-param>
                 <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                 <param-value>com.fimat.kb.jsf.utils.BaseKbViewHandler</param-value>
                 </context-param>
                 <context-param>
                 <param-name>com.fimat.helper.phaseTracker.cphase</param-name>
                 <param-value>ANY_PHASE</param-value>
                 </context-param>
                 <context-param>
                 <param-name>org.richfaces.LoadScriptStrategy</param-name>
                 <param-value>ALL</param-value>
                 </context-param>
                 <context-param>
                 <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
                 <param-value>false</param-value>
                 </context-param>
                 <context-param>
                 <param-name>facelets.REFRESH_PERIOD</param-name>
                 <param-value>-1</param-value>
                 </context-param>
                 <filter>
                 <filter-name>MyFacesExtensionsFilter</filter-name>
                 <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
                 <init-param>
                 <param-name>maxFileSize</param-name>
                 <param-value>20m</param-value>
                 </init-param>
                 </filter>
                 <filter>
                 <display-name>Ajax4jsf Filter</display-name>
                 <filter-name>ajax4jsf</filter-name>
                 <filter-class>org.ajax4jsf.Filter</filter-class>
                 <init-param>
                 <param-name>forceparser</param-name>
                 <param-value>false</param-value>
                 </init-param>
                 </filter>
                 <filter>
                 <filter-name>extensionsFilter</filter-name>
                 <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
                 <init-param>
                 <param-name>uploadMaxFileSize</param-name>
                 <param-value>100m</param-value>
                 </init-param>
                 <init-param>
                 <param-name>uploadThresholdSize</param-name>
                 <param-value>100k</param-value>
                 </init-param>
                 <init-param>
                 <param-name>uploadRepositoryPath</param-name>
                 <param-value>/temp</param-value>
                 </init-param>
                 </filter>
                 <filter>
                 <filter-name>Redirect_Filter</filter-name>
                 <filter-class>com.fimat.kb.jsf.utils.BaseFacesAccessFilter</filter-class>
                 </filter>
                 <filter-mapping>
                 <filter-name>ajax4jsf</filter-name>
                 <url-pattern>/*</url-pattern>
                 <dispatcher>REQUEST</dispatcher>
                 <dispatcher>FORWARD</dispatcher>
                 <dispatcher>INCLUDE</dispatcher>
                 </filter-mapping>
                 <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
                 <filter-mapping>
                 <filter-name>MyFacesExtensionsFilter</filter-name>
                 <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
                 <servlet-name>Faces Servlet</servlet-name>
                 </filter-mapping>
                 <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
                 <filter-mapping>
                 <filter-name>MyFacesExtensionsFilter</filter-name>
                 <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
                 </filter-mapping>
                 <filter-mapping>
                 <filter-name>extensionsFilter</filter-name>
                 <url-pattern>*.shtml</url-pattern>
                 </filter-mapping>
                 <filter-mapping>
                 <filter-name>Redirect_Filter</filter-name>
                 <url-pattern>*.xhtml</url-pattern>
                 </filter-mapping>
                 <servlet>
                 <servlet-name>Faces Servlet</servlet-name>
                 <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                 <servlet-mapping>
                 <servlet-name>Faces Servlet</servlet-name>
                 <url-pattern>*.jsf</url-pattern>
                 </servlet-mapping>
                 <session-config>
                 <session-timeout>2</session-timeout>
                 </session-config>
                 <welcome-file-list>
                 <welcome-file>login.jsf</welcome-file>
                 </welcome-file-list>
                 <security-constraint>
                 <display-name>All JSF pages</display-name>
                 <web-resource-collection>
                 <web-resource-name>all</web-resource-name>
                 <url-pattern>/*</url-pattern>
                 <http-method>GET</http-method>
                 <http-method>POST</http-method>
                 </web-resource-collection>
                 </security-constraint>
                 <login-config>
                 <auth-method>BASIC</auth-method>
                 </login-config>
                </web-app>