2 Replies Latest reply on May 19, 2008 3:54 AM by baumhoto

    Javascript error when page is rerender

      Hey Guys i need your help again.

      Im getting the next javascript error when some parts of my page are rerender.

      Object doesnt support this porperty or method. Im not sure if the problem is the inplace editor tag, the error begin when i put this tag in my page

      in a4j log putted in my page i have the next entries.



      debug[15:48:39,988]: Evaluate script replaced area in document: //
      Richfaces.InplaceSelect.CLASSES = {
      COMBO_LIST : {
      LIST : {CLASSES :{ACTIVE : "rich-inplace-select-list-scroll rich-inplace-select-list-decoration rich-inplace-select-list-position "
      }
      },
      ITEM : {NORMAL : "rich-inplace-select-item rich-inplace-select-font ",
      SELECTED : 'rich-inplace-select-item rich-inplace-select-font rich-inplace-select-selected-item '
      }
      },
      COMPONENT : {CHANGED : {NORMAL : 'rich-inplace-select rich-inplace-select-view rich-inplace-select-changed ', HOVERED : 'rich-inplace-select-changed-hover '},
      VIEW : {NORMAL : 'rich-inplace-select rich-inplace-select-view ', HOVERED : 'rich-inplace-select-view-hover '},
      EDITABLE : 'rich-inplace-select rich-inplace-select-edit '
      }
      };
      new Richfaces.InplaceSelect(new Richfaces.InplaceSelectList('listresolutionMant:j_id_jsp_1430670112_34', 'listParentresolutionMant:j_id_jsp_1430670112_34', true,
      Richfaces.InplaceSelect.CLASSES.COMBO_LIST, '200px', '90px', [['Marquez Medina, Renato ','1'] ,['Arce Chacon, Ricardo Antonio','2'] ,['Bonilla Acevedo, Roberto ','3'] ,['Molina Arriola, Mario Alexander ','4'] ,['Escoto Gaitan, Jennifer Ivette ','5'] ,['Trujillo Navas, Tommy Oseas ','6'] ,['Aguilar de Gomar, Jennifer Lissette ','7'] ,['Del Cid , Carolina ','8'] ,['Rodriguez Recinos, Ronald Arturo ','9'] ,['Peña Ramirez, Tatiana Margarita ','10'] ,['Parras Barahona, Alex Danny ','11'] ,['Rivas Castillo, Juan Carlos ','12'] ,['Pacheco Sanchez, Ana Patricia','13'] ,['Monge Escalante, Ronald Alexander ','14'] ,['Martinez Alas, Jose Emilio ','15'] ,['Perez Solis, Efren ','16'] ,['Monterrosa , Carlos Rodolfo ','17'] ,['Valle Belloso, Mario Roberto','18'] ,['Rodriguez Hernandez, Carlos Alberto ','19'] ,['Fernandez Aparicio, William Vladimir ','20'] ,['de Umanzor , Liliana ','21'] ,['Garay Salguero, Nelson Omar ','22'] ,['Zelada Eduarcas, Roberto Alejandro','23'] ,['Reyes , Saul ','24'] ,['Mendoza , Ulises Roberto ','25'] ,['Cornejo Vasquez, Erich Ronald ','26'] ,['Rogel Espino, Miguel Antonio ','27'] ,['Dale Wada, Carlos Graham ','28'] ,['Arias , Leda Eunice ','29'] ,['Santos , Silvia Georgina ','30'] ,['Valle , Francisco ','31'] ,['Alarcon , Linda ','32'] ,['Parras , Marvin ','33'] ] , null,
      'resolutionMant:j_id_jsp_1430670112_34inplaceTmpValue', 'shadowresolutionMant:j_id_jsp_1430670112_34', 0, 0, ''),
      'resolutionMant:j_id_jsp_1430670112_34', 'resolutionMant:j_id_jsp_1430670112_34inplaceTmpValue',
      'resolutionMant:j_id_jsp_1430670112_34inplaceValue', 'resolutionMant:j_id_jsp_1430670112_34tabber',
      {defaultLabel : 'Seleccione un vendedor',
      showControls : false,
      editEvent : 'onclick',
      verticalPosition : 'center',
      horizontalPosition : 'right',
      inputWidth : '',
      minInputWidth : '100px',
      maxInputWidth : '200px',
      openOnEdit: true,
      closeOnSelect: true},
      {oneditactivation : null,
      onviewactivation : null,
      oneditactivated : null,
      onviewactivated : null},
      Richfaces.InplaceSelect.CLASSES,
      ['resolutionMant:j_id_jsp_1430670112_34bar', 'resolutionMant:j_id_jsp_1430670112_34ok', 'resolutionMant:j_id_jsp_1430670112_34cancel', 'resolutionMant:j_id_jsp_1430670112_34buttons', 'resolutionMant:j_id_jsp_1430670112_34btns_shadow'], 'resolutionMant:j_id_jsp_1430670112_34inselArrow');
      //
      error[15:48:40,034]: . Error message: No se pudo completar la operación debido un error 80020101.
      debug[15:48:40,034]: Evaluate script replaced area in document: //
      SimpleTogglePanelManager.add(new SimpleTogglePanel("resolutionMant:PfResolution:resPanel",
      "false",{onexpand: '',oncollapse: ''}

      ));//


      Thanks

        • 1. Re: Javascript error when page is rerender

          Now i know that the problem is caused for something in the inplace editor tag, because if i remove the inplace editor tag from my code, the error doesnt happen

          here you a code snippet

          <?xml version="1.0" encoding="ISO-8859-1"?>
          <jsp:root version="1.2" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
           <jsp:directive.page contentType="text/html;charset=ISO-8859-1" pageEncoding="ISO-8859-1"/>
           <f:view>
           <ui:page id="page1">
           <ui:html id="html1">
           <ui:head id="head1">
           <ui:link id="link1" url="/../resources/stylesheet.css"/>
           <ui:script url="/common/utils.js" type="text/javascript"/>
           </ui:head>
           <ui:body id="body1" onLoad="showMessages(#{PfEncabezado.hasMessages}, '#{PfEncabezado.messages}')">
           <jsp:directive.include file="/common/PfEncabezadoV2.jspf"/>
           <h:panelGrid columns="1" width="100%">
           <a4j:form id="resolutionMant">
           <rich:toolBar id="toolbarSolicitud" height="26" itemSeparator="line">
           <rich:toolBarGroup itemSeparator="none">
           <h:outputLabel value="Fecha: " style="font-weight:bold"/><h:outputText binding="#{wpSolicitud.fechacreacion}" style="color:white;font-weight:bold"><f:convertDateTime pattern="dd/MM/yyyy HH:mm:ss"/></h:outputText>
           </rich:toolBarGroup>
           <rich:toolBarGroup itemSeparator="none" rendered="#{wpSolicitud.modifySeller}">
           <h:outputLabel value="Vendedor: " style="font-weight:bold"/>
           <h:panelGrid cellspacing="0" cellpadding="0" columns="2">
           <rich:inplaceSelect binding="#{wpSolicitud.sellerEditor}"
           defaultLabel="Seleccione un vendedor" openOnEdit="true"
           showControls="false"
           editEvent="onclick"
           layout="block"
           listHeight="90px">
           <f:selectItems value="#{wpSolicitud.sellerList}" />
           <f:converter converterId="javax.faces.Long"/>
           </rich:inplaceSelect>
           <a4j:commandButton actionListener="#{wpSolicitud.saveSeller}" value="Guardar"></a4j:commandButton>
           </h:panelGrid>
           </rich:toolBarGroup>
           </rich:toolBar>
           <h:inputHidden binding="#{wpSolicitud.actionSolicitud}" id="actionSolicitud">
           </h:inputHidden>
           <h:inputHidden binding="#{wpSolicitud.idestado}" id="idestado">
           <f:converter converterId="javax.faces.Long"/>
           </h:inputHidden>
           <h:inputHidden binding="#{wpSolicitud.idtiposolicitud}" id="idtiposolicitud">
           <f:converter converterId="javax.faces.Long"/>
           </h:inputHidden>
           </h:panelGrid>
           </a4j:form>
           <a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
           </ui:body>
           </ui:html>
           </ui:page>
           </f:view>
          </jsp:root>
          


          • 2. Re: Javascript error when page is rerender
            baumhoto

            I'm getting this error too when using Richfaces 3.21CR3 in IE7. With FF2 everything works. When using Richfaces 3.14 IE7 works too.

            The A4J-Log prints out this message:

            Evaluate script replaced area in document: new ModalPanel('rights_ModalPanel',
             { width: -1, height: -1, minWidth: 700, minHeight: 500,
             resizeable: true, moveable: true, left: "auto", top: "auto",
             zindex: 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide: '',
             keepVisualState: false, showWhenRendered: false,
             selectBehavior: "disable", autosized: false});
            error[9:27:50,109]: . Error Message: Could not complete the operation
            due to error 80020101


            Anyone has an idea why this is happening?