0 Replies Latest reply on Dec 11, 2007 7:11 PM by Ramprasad Maganti

    Duplicate attribute issue with Suggestionbox when you set se

    Ramprasad Maganti Newbie

      Hi

      I am getting duplicate attribute issue in table element when using suggestionbox with attribute selfRendered is "true". It is adding two class attributes in table and it is throwing duplicate attribute error while parsing AJAX response. Could anybody help me if they come across the same issue. The code & Error details as follows:


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


      Error detail with Response:
      duplicate attribute
       [Break on this error] undefinedtest.seam;jsessio... (line 1)
      POST http://localhost:7001/test.seam;jsessionid=SVWrHfYXGpp2GF2mZyN4JnhQpMp7pT28lFCL2Bp8nLGJG5sCDknK!1596102305 (94ms)a4j_3_1_2.GAorg.a... (line 25)
      ParamsHeadersPostResponse
      Response Headers
      Request Headers
      
      <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="citySearch:j_id2:suggest" class=""><colgroup span="1"></colgroup><tbody><tr class
      
      ="dr-sb-int rich-sb-int richfaces_suggestionEntry "><td style="display: none;" class="richfaces_suggestionSelectValue"
      
      >BOSTON,MA</td><td nowrap="nowrap" class="dr-sb-cell-padding rich-sb-cell-padding" style
      
      =";">BOSTON,MA</td></tr></tbody></table><meta name="Ajax-Update-Ids" content="citySearch
      
      :j_id2: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:

      <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:s="http://jboss.com/products/seam/taglib"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:a="https://ajax4jsf.dev.java.net/ajax">
      
       <h:form id="tickerSearch" name="tickerSearch">
      
       <h:inputText id="searchString" name="searchString" value="#{citySearch.searchString}" class="text" />
       <rich:suggestionbox width="200" height="200" for="searchString" fetchValue="#{cityObjs.name}" suggestionAction="#{citySearch.autocomplete}" var="cityObjs" selfRendered="true" >
       <h:column>
       <h:outputText value="#{cityObjs.name}"></h:outputText>
       </h:column>
       </rich:suggestionbox>
       </h:form>

      I am using RichFaces 3.1.2 GA version. I am able to get the above response from server with proper values ( used a4j log element to see client req & response) and it is failing while parsing that AJAX response due to table have duplicate class attributes. This piece of code is generated by Richfaces. Is there any bug or am i missing anything?

      I really appreciate of people thoughts /suggestions.

      Thanks,