2 Replies Latest reply on Feb 4, 2008 2:15 AM by Kurt Edegger

    s:formattedText fails with dynamic content being null

    Kurt Edegger Newbie


      we were facing "random" ugly XML Parsing errors in our seam application, which is using <s:formattedText> with content from backing beans like the following example:

      <s:formattedText value="some text referring to the users email, which is optional (*#{user.email}*), but the address should be printed bold." />

      We've noticed that the error occurs if the user didn't provide an email address, hence the content of the backing bean is null.
      We confirmed that <s:formattedText> fails if there is no content between two formatting characters as exemplified by the following:

      <s:formattedText value="Hello, *this* is the text"/>

      is working fine, but
      <s:formattedText value="Hello, ** is the text"/>

      will lead to

      XML Parsing Error: mismatched tag. Expected: </b>.
      Location: http://localhost:8080/umgmt/richtext.html
      Line Number 81, Column 13:Hello, <b></div></div>

      So, my questions would be:

      1) Is this a known issue or limitation (we are using Seam 2.0.0)?
      2) Has this been fixed in a more recent release?
      3) How would someone deal with this situation? Any suggestions on how to handle dynamic content, that could be null as well?

      Best regards and thank you in advance,