Will JSF escape the "<BR/>" and make it "&lt;BR/&gt;"?  I still want other
"HTML" characters like "&" and "<" escaped.

 - Dave



Jakob Korherr wrote:
> 
> Hi,
> 
> You can provide a special getter method in your managed bean for that
> (something like getResultWithLineBreaks()) and replace "\n" with "<br />"
> in
> the return value of method. Then you have to change your t:outputText
> component to:
> 
> <t:outputText value="#{currentRow.resultWithLineBreaks}" escape="false" />
> 
> Regards,
> Jakob
> 
> 2010/2/22 laredotornado <[email protected]>
> 
>>
>> Hi,
>>
>> I'm using MyFaces 1.1.5 with Tomahawk 1.1.7 (Java 1.5, Resin, 3.0.19). 
>> Is
>> there a way in JSF where I can replace the "\n" (chr(13) carriage return
>> character) with the "<BR/>" tag in my outputText block?  Right now I have
>>
>> <t:outputText value="#{currentRow.result}" />
>>
>> Thanks, - Dave
>> --
>> View this message in context:
>> http://old.nabble.com/How-to-elegantly-replace-line-breaks-with-%3CBR%3E-tag--tp27690198p27690198.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-elegantly-replace-line-breaks-with-%3CBR%3E-tag--tp27690198p27692067.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to