4 Replies Latest reply on Jan 4, 2009 9:25 PM by dsmith1

    reRendered links broken due to replacing & with & #38;

    matt.drees

      Hi,

      I have a seam-facelets-richfaces app that works great in Firefox and IE. However, there is one section that has a table with links that is re-rendered by a4j, and Safari doesn't like the links that are re-rendered. The links that are rendered in the initial page rendering are fine, but when the table is re-rendered by a4j, the links are unusable. Initially, the links are rendered like this:

      <a href="/crs/admin/editHome.seam?conversationPropagation=begin&amp;conferenceId=9&amp;cid=19" id="conference_listing:3:manageLink">Manage</a>
      

      However, after an a4j re-render, the links look like this:
      <a href="/crs/admin/editHome.seam?conversationPropagation=begin& #38;conferenceId=13& #38;cid=20" id="conference_listing:3:manageLink">Manage</a>
      

      (Note: I've manually added a space in between "&" and "#38;" for this forum; otherwise the forum will show "&" instead of spelling it out, even though it's in a code block)

      The &amp; entity reference has been replaced by the & #38; numeric character reference. For some reason, Safari doesn't like this, and if I click on the link, the second two parameters (conferenceId and cid) are lost.


      From a4j:log, I can tell the server is sending back links with &amp; in ajax responses, so I suspect this is a client-side a4j javascript issue.

      Is this an a4j bug? If not, is there a way I can prevent a4j from converting &amp; references into & #38; references?

      Also, Google Chrome breaks same way Safari does, but Firefox 3 and IE are fine (they both render the link with &amp; instead of & #38;).

      Thanks!
      I've pasted the xhtml snippet below.
      I'm using richfaces 3.2.1GA

      <a:outputPanel id="conferenceSearchResults" ajaxRendered="true">
       <s:div id="conference_search_results_div"
       rendered="true">
       <h2>Conference Listing</h2>
       <h:outputText value="No Conferences Found" rendered="#{empty conferenceSearching.resultList}"/>
       <h:dataTable id="conference_listing" value="#{conferenceSearching.resultList}"
       styleClass="segmented"
       var="conf" rendered="#{not empty conferenceSearching.resultList}">
       <h:column id="conference_name">
       #{conf.name}
       </h:column>
       <h:column id="conference_begin_date">
       <h:outputText value="#{conf.beginDate}">
       <s:convertDateTime type="date" dateStyle="short"/>
       </h:outputText>
       </h:column>
      
       <h:column id="conference_edit">
       <s:link id="manageLink"
       value="Manage"
       view="/admin/editHome.xhtml">
       <f:param name="conversationPropagation"
       value="begin"/>
       <f:param name="conferenceId"
       value="#{conf.id}"/>
       </s:link>
       </h:column>
      
       </h:dataTable>
       <s:link value="More results" action="#{conferenceSearching.next}" rendered="#{conferenceSearching.nextExists}"/>
       </s:div>
      </a:outputPanel>