14 Replies Latest reply on Feb 18, 2008 4:09 AM by Mikael Andersson

    Parse Error: modalpanel rerendering

    Mikael Andersson Master

      Hi,
      I'm getting a Parse Error in the a4j:log window when trying to call a backing bean and then rerender content in the modal panel.

      The modal panel is defined outside of any other forms and has its own form as a child.

      Using:
      RichFaces 3.1.4.GA
      Seam 2.0.1.GA

      Modal panel definition:

      <rich:modalPanel
       id="cptySearchMp"
       minHeight="200"
       minWidth="450"
       height="200"
       width="500"
       zindex="2000">
       <f:facet name="header">
       <h:outputText value="Search For Counterparty" />
       </f:facet>
       <f:facet name="controls">
       <a href="javascript:Richfaces.hideModalPanel('cptySearchMp')">Close</a>
       </f:facet>
      
       <a4j:include viewId="/jsf/favourite/cptySearch.xhtml"/>
       </rich:modalPanel>
      


      cptySearch.xhtml
      <ui:composition
       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:rich="http://richfaces.ajax4jsf.org/rich"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:lcf="http://limex.dkib.com/func">
      
       <h:form id="cptySearchForm">
      
       Search pattern: <h:inputText value="#{cptySearch.pattern}"/>
      
       <a4j:commandLink action="#{cptySearch.search}" value="Search" reRender="tableWrapper"/>
       <a4j:status startText="Working..." stopText=""/>
      
       <br/>
      
       <a4j:outputPanel layout="none" id="tableWrapper">
       <rich:dataTable
       id="searchResult"
       rendered="#{not empty cptySearch.result}"
       value="#{cptySearch.result}"
       var="row"
       rows="10"
       width="400px">
      
       <f:facet name="header">
       <rich:datascroller for="searchResult"/>
       </f:facet>
      
       <rich:column>
       <f:facet name="header">
       Code
       </f:facet>
       #{row.code}
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Name
       </f:facet>
       #{row.name}
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Action
       </f:facet>
       <h:commandLink value="Add" action="#{favBacking.addFavourite(row.code)}"/>
       </rich:column>
       </rich:dataTable>
       </a4j:outputPanel>
      
       <rich:messages showDetail="true"/>
       </h:form>
      </ui:composition>
      


      a4j:log output:
      debug[17:18:20,080]: Header Ajax-Expired not found, search in <meta>
      error[17:18:20,080]: Error parsing XML
      error[17:18:20,095]: Parse Error: XML Parsing Error: Whitespace is not allowed at this location.
      Location: Line Number 7, Column 123:
      <script type="text/javascript" language="Javascript">function dpf(f) {var adp = f.adp;if (adp != null) {for (var i = 0;i < adp.length;i++) {f.removeChild(adp);}}};function apf(f, pvp) {var adp = new Array();f.adp = adp;var ps = pvp.split(',');for (var i = 0,ii = 0;i < ps.length;i++,ii++) {var p = document.createElement("input");p.type = "hidden";p.name = ps;p.value = ps[i + 1];f.appendChild(p);adp[ii] = p;i += 1;}};function jsfcljs(f, pvp, t) {apf(f, pvp);var ft = f.target;if (t) {f.target = t;}f.submit();f.target = ft;dpf(f);};</script>
      ---------------------------------------------------------------------------------------------------------------------------^
      debug[17:18:20,095]: call selectSingleNode for id= org.ajax4jsf.oncomplete