views:

641

answers:

3

I'm saving html and/or rich formated text in a database, and I'm trying to show it in an IceFaces text field, but it doesn't show the propper format (line breaks or urls).
Is there a tag or a component that shows me the proper rich text or html format?
Thanks!

A: 

I only found this solution that can create HTML inside an ICEfaces page, use the output of Facelets:

#{backingBean.HTML_delivering_method}

This injects your HTML in the page and processes it like you have written it inside the page. Although, you have to test if all line breaks are processed correctly.

rainwebs
A: 

Actually, it's a lot easier than I thought...
To properly output HTML saved on a database using ICEFaces you just have to use the <ice:outputLabel/> tag, and use in the value attribute #{backBean.object.html_txt_field}, like this:

<ice:outputLabel id="olDescription" value="#{backBean.object.htmlTXTfield}" />

And that was all :)

ramayac
+1  A: 

try :

ice:outputText value="#{your.bean}" escape="false"

Rio
Excelent!, Thanks!
ramayac