6 Replies Latest reply on May 26, 2009 8:51 AM by Davide Malpassini

    Error richfaces 3.3.1 on firefox 3.0

    Davide Malpassini Newbie

      I had a page that under the richfaces 3.3.0 worked well , when i updated the application to 3.3.1 i got the seguent error :

      uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object" nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" location: "JS frame :: http://localhost:8080/AGRTIWEBFTP/faces/a4j/g/3_3_2-SNAPSHOT/org/ajax4jsf/framework.pack.js :: anonymous :: line 5385" data: no]

      This happens when i have done a partial refresh and after i'm doing a full refresh of a new page for a rule in faces-config.xml
      during the full refresh of the page with an ajax call the page give me the error.

      Someone can help me

        • 1. Re: Error richfaces 3.3.1 on firefox 3.0
          Davide Malpassini Newbie

          i post the code i have :

          a template.xhtml

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html 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"
          
           >
          
          <head>
          
          <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8"/>
          <title>
           <ui:insert name="title"/>
          </title>
          <!-- script type="text/javascript" src="${facesContext.externalContext.requestContextPath}/css/prototype.js"/ -->
          <link rel="STYLESHEET" type="text/css" href="${facesContext.externalContext.requestContextPath}/css/main.css"/>
          <script>
          A4J.AJAX.onExpired = function(loc, expiredMsg){
           if(window.confirm("La sessione è scaduta, riconnettersi ?")){
           return loc;
           } else {
           return false;
           }
          }
          A4J.AJAX.onError = function(req, status, message){
          
           window.alert("Attenzione errore: "+message);
           return "{facesContext.externalContext.requestContextPath}/faces/private/home.xhtml";
          }
          
          </script>
          
          
          <script type="text/javascript">
           var infoWindowAMShown = false;
           var infoWindowAMTimer;
           function showModalInfoWindow()
           {
           infoWindowAMTimer = setTimeout("if(!infoWindowAMShown){Richfaces.showModalPanel('ajaxLoadingModalBox');infoWindowAMShown=true;}", 10);
           }
           function hideModalInfoWindow()
           {
           if (infoWindowAMShown){Richfaces.hideModalPanel('ajaxLoadingModalBox');infoWindowAMShown=false;}else{if(infoWindowAMTimer)clearTimeout(infoWindowAMTimer);}
           }
          
          
          
          </script >
          
          </head>
          
          <body>
          
          <a4j:status onstart="showModalInfoWindow();" onstop="hideModalInfoWindow()"></a4j:status>
          
          <rich:modalPanel id="ajaxLoadingModalBox" minHeight="200" minWidth="450"
           height="100" width="250" zindex="2000">
           <f:facet name="header">
           <h:outputText value="Richiesta in elaborazione"></h:outputText>
           </f:facet>
           <h:outputText value="wait" ></h:outputText>
          </rich:modalPanel>
          
          <div id="logo">
           <h1 style="margin-left: 100px">AGRIT 2009 - STATISTICHE </h1>
          </div>
          <div id="page">
          <!-- a4j:include viewId="/template/include/navigationPanel.xhtml" /> -->
          
          <div id="sidebar">
          <a4j:form id="menuForm" >
           <ui:insert name="menu">
          
           <rich:panelMenu style="width:95%;" id="panelmenu" expandSingle="true" expandMode="none" mode="ajax" >
           <rich:panelMenuGroup label="Home Page" action="#{menu.goToHome}" expandMode="ajax" immediate="true" ajaxSingle="true">
          
           </rich:panelMenuGroup>
           <rich:panelMenuGroup label="Reports" expandMode="ajax" expanded="true" mode="ajax" >
           <rich:panelMenuItem label="Rilievi Uso Suolo Acquisiti" action="#{menu.goTo}" mode="ajax" >
           <f:param name="current" value="reportSalPerRegione"/>
           <f:param name="type" value="uso"/>
           </rich:panelMenuItem>
          
           <rich:panelMenuItem label="Report Rilevatori Per Regione" action="#{menu.goTo}" ajaxSingle="false" rendered="#{menu.renderAll}" >
           <f:param name="current" value="reportRilevatoriPerRegione"/>
           </rich:panelMenuItem>
           </rich:panelMenuGroup>
           </rich:panelMenu>
          
          
          
           </ui:insert>
          
          
          
           </a4j:form>
          </div>
          
          
          <div id="contents">
          
          
           <ui:insert name="content">
           Contenuto
          
           </ui:insert>
          
          
          </div >
          
          
          
          
          
          
          </body>
          </html>
          
          
          


          i add also the code of a sample page

          
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:a4j="http://richfaces.org/a4j"
           xmlns:rich="http://richfaces.org/rich"
           xmlns:opt="http://primefaces.prime.com.tr/optimus"
          
           >
          
          <ui:composition template="/template/main.xhtml">
           <ui:define name="title">Benvenuto: HomePage</ui:define>
          
           <ui:define name="content">
          
          
           <div >
           <rich:panel>
           <f:facet name="header">
           Report Rilevatori Per Regione:
           </f:facet>
           <a4j:form ajaxSingle="true" ajaxSubmit="true" prependId="false" process="table" reRender="table">
           <div style="display: inline">
           <h:outputText value="Regione: " />
           <!-- rich:comboBox id="cmbRegioni" styleClass="combobox" value="#{reportRilevatoriPerRegione.selectedRegione}"
           directInputSuggestions="true" defaultLabel="Scegli un valore" enableManualInput="false" immediate="true" >
           <f:selectItems value="#{reportRilevatoriPerRegione.listaRegioni}" />
           < /rich:comboBox -->
           <h:selectOneMenu value="#{reportRilevatoriPerRegione.selectedRegione}" required="true" >
           <f:selectItem itemLabel="Select " />
           <f:selectItems value="#{reportRilevatoriPerRegione.listaRegioni}" />
           </h:selectOneMenu>
           <h:outputText value=" Sub Prog: " />
           <h:selectOneMenu value="#{reportRilevatoriPerRegione.selectedSubProg}" >
           <f:selectItem itemValue="2222" itemLabel="FASE" />
           </h:selectOneMenu>
           <a4j:commandButton value="Carica" action="#{reportRilevatoriPerRegione.doReport}" style="" >
           </a4j:commandButton>
           </div>
           </a4j:form>
          
          
          
           </rich:panel>
           <rich:spacer height="6px"/>
           <rich:panel>
           <f:facet name="header">
           <h:outputText value="Report: " />
          
           </f:facet>
          
           <a4j:keepAlive beanName="reportRilevatoriPerRegione" />
          
           <rich:dataTable id= "table" var="item" value="#{reportRilevatoriPerRegione.listaTable}"
           columnsWidth="100px,100px,100px,50px,50px,50px,50px,50px,50px" headerClass="point" >
           <rich:column sortable="true">
           <f:facet name="header">
           <h:outputText value="Cod. Fis. Rilevatore" />
           </f:facet>
           <h:outputText value="#{item.ril.codFiscale}"/>
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Nome Rilevatore"/>
           </f:facet>
           <h:outputText value="#{item.ril.nomeRilev}"/>
           </rich:column>
           <rich:column >
           <f:facet name="header">
           <h:outputText value="Cognome Rilevatore"/>
           </f:facet>
           <h:outputText value="#{item.ril.cognomeRilev}"/>
           </rich:column>
           <rich:column sortable="true" style="width:30px" >
           <f:facet name="header" >
           <h:outputText value="" >
           <h:outputText value="Pt." />
           <br/>
           <h:outputText value="Acquisiti" />
           </h:outputText>
           </f:facet>
           <h:outputText value="#{item.puntiAcquisiti}">
          
           </h:outputText>
           </rich:column>
           <rich:column sortable="true">
           <f:facet name="header">
           <h:outputText value="" >
           <h:outputText value="Pt." />
           <br/>
           <h:outputText value="Tot" />
           </h:outputText>
           </f:facet>
           <h:outputText value="#{item.puntiTotali}">
          
           </h:outputText>
           </rich:column>
           <rich:column >
           <f:facet name="header" >
           <h:outputText value="" >
           <h:outputText value="Pt." />
           <br/>
           <h:outputText value="Cont Video" />
           </h:outputText>
           </f:facet>
           <h:outputText value="#{item.puntiVideo}">
          
           </h:outputText>
           </rich:column>
           <rich:column >
           <f:facet name="header">
           <h:outputText value="" >
           <h:outputText value="Pt." />
           <br/>
           <h:outputText value="Esito Neg" />
           </h:outputText>
           </f:facet>
           <h:outputText value="#{item.puntiEsitoNegativo}">
          
           </h:outputText>
           </rich:column>
           <rich:column >
           <f:facet name="header">
           <h:outputText value="" >
           <h:outputText value="Pt." />
           <br/>
           <h:outputText value="A Collaudo" />
           </h:outputText>
           </f:facet>
           <h:outputText value="#{item.puntiSottoCollaudo}">
          
           </h:outputText>
           </rich:column>
           <rich:column >
           <f:facet name="header">
           <h:outputText value="" >
           <h:outputText value="Pt." />
           <br/>
           <h:outputText value="Coll. Neg." />
           </h:outputText>
           </f:facet>
           <h:outputText value="#{item.puntiEsitoNegativoCollaudo}">
          
           </h:outputText>
           </rich:column>
          
           </rich:dataTable>
          
          
           </rich:panel>
          
           </div>
          
          
           </ui:define>
          
          </ui:composition>
          
          
          </html>
          
          
          
          


          So whe i switch from a page to another page without doing any it's all ok but if i get a page from the panel menu the i refresh the table and switch to another page with a panel menu item the error occur .





          • 2. Re: Error richfaces 3.3.1 on firefox 3.0
            Nick Belaevski Master

            Hi,

            Do you use "redirect" type of navigation?

            • 3. Re: Error richfaces 3.3.1 on firefox 3.0
              Davide Malpassini Newbie

              yes, with redirect on is all right but the problem is that i can't enable and also why with richfaces 3.3.0 is it all ok? and with the 3.3.1 is not? i think is a regression bug, but if i can found a workaround i will be happy. But i can't enable redirect because with redirect enabled the application forgot the parameter that i pass to the next page in the action.

              Thanks

              • 4. Re: Error richfaces 3.3.1 on firefox 3.0
                Ilya Shaikovsky Master

                ajax navigation proved to works only with redirect cases. Results for non redirect navigation could be unpredictable because it just not still supported in general.

                the only case where ajax navigation with non redirect cases could be used - inside a4j:include'd content(see demo).

                • 5. Re: Error richfaces 3.3.1 on firefox 3.0
                  Remi Guillemette Newbie

                  I have the same problem with FF3. IE is alright.

                  My rich:datatable use a4j:commandLink to redirect to another page. The redirection is done but I got the js error and all rich component on the page stop working (no popup calendar, a4j:support did not submit the form anymore, etc).

                  I solve my issue by replacing a4j:commandLink by a4j:htmlCommandLink in my Datatable.

                  @+

                  • 6. Re: Error richfaces 3.3.1 on firefox 3.0
                    Davide Malpassini Newbie

                    thanks for the help, but my problem is not solved i get always the error.