0 Replies Latest reply on Dec 12, 2007 12:03 PM by Ramprasad Maganti

    rich:suggestionbox duplicate table class attribute issue in

    Ramprasad Maganti Newbie

      Hi

      I am facing duplicate attribute issue with the generated AJAX response, when i was using rich:suggestionbox. It is generating AJAX response, but generated html table (code generated by Richfaces) having two duplicate class attributes, which is causing error while parsing. I am using 3.1.2 GA richfaces in weblogic 9.2. Please refer below, in dataTable it is having two class attributes:


      <table border="0" cellpadding="0" cellspacing="0" class="dr-sb-int-decor-table rich-sb-int-decor-table" width="100%" id="j_id2:j_id3:suggest" class="">


      debug[11:43:50,243]: Header Ajax-Expired not found, search in
      error[11:43:50,243]: Error parsing XML
      error[11:43:50,243]: Parse Error: XML Parsing Error: Duplicate attribute


      error[11:52:55,769]: Parse Error: XML Parsing Error: Duplicate attribute.
      Location: Line Number 1, Column 993:
      <html lang="en_US"><body>
      <script src="/a4j_3_1_2.GAorg.ajax4jsf.javascript.AjaxScript.action" type="text/javascript"></script>
      <script src="/a4j_3_1_2.GAorg.ajax4jsf.javascript.PrototypeScript.action" type="text/javascript">
      </script><script src="/a4j_3_1_2.GAorg.ajax4jsf.javascript.SmartPositionScript.action" type="text/javascript"></script>
      <script src="/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/browser_info.js.action" type="text/javascript"></script>
      <script src="/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/scriptaculo.js.action" type="text/javascript"></script>
      <script src="/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/suggestionbox.js.action" type="text/javascript"></script>
      <link href="/a4j_3_1_2.GAorg/richfaces/renderkit/html/css/suggestionbox.xcss/DATB/eAGLZKr5DAADWQHL.action" type="text/css" rel="stylesheet" />
      <table border="0" cellpadding="0" cellspacing="0" class="dr-sb-int-decor-table rich-sb-int-decor-table" width="100%" id="j_id2:j_id3:suggest" class="">
      <colgroup span="1"></colgroup><tbody><tr class="dr-sb-int rich-sb-int richfaces_suggestionEntry ">
      <td nowrap="nowrap" class="dr-sb-cell-padding rich-sb-cell-padding" style=";">BOSTON</td></tr>
      </tbody></table>
      <meta name="Ajax-Update-Ids" content="j_id2:j_id3:suggest" /><span id="ajax-view-state">
      <span id="org.ajax4jsf.view.state" name="org.ajax4jsf.view.state">
      </span></span>
      <meta id="Ajax-Response" name="Ajax-Response" content="true" />
      </body></html>



      Source Code:

      <!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:c="http://java.sun.com/jstl/core"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       xmlns:rich="http://richfaces.org/rich">
      
       <h:form>
       <h:inputText id="su"></h:inputText>
       <rich:suggestionbox width="200" height="200" for="su" suggestionAction="#{citySearch.autocomplete}" selfRendered="true" var="cityObjs">
       <h:column>
       <h:outputText value="#{cityObjs.name}"></h:outputText>
       </h:column>
       </rich:suggestionbox>
       <a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
       </h:form>
      
      </html>