ramayac
ramayac

Reputation: 5183

Show html formated text on IceFaces

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!

Upvotes: 1

Views: 3203

Answers (3)

Rio
Rio

Reputation:

try :

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

Upvotes: 2

ramayac
ramayac

Reputation: 5183

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 :)

Upvotes: 0

rainwebs
rainwebs

Reputation: 111

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.

Upvotes: 0

Related Questions