user3508945
user3508945

Reputation: 1

jsf managed bean method's string in html

Hi i have this method in managed bean.

public String instructionsText() {
     String text = "Whether your web site needs a simple 'face lift' <br /> "+
                   " major 'reconstructive surgery,' the staff of"

    return text;
}

in my jsf page :

<img src="http://icons.iconarchive.com/icons/aroche/delta/32/Help-icon.png" style="float:right" onclick="PF('dlgi').show();" alt="help" />

I want a line break in string text at the place of <br />.But i tried in different ways (\n, \r\n, \r ,<br> , <br />).Nothing worked.Help would be greatly appreciated.Thank you.

Upvotes: 0

Views: 417

Answers (1)

Kishor Prakash
Kishor Prakash

Reputation: 8171

There is a escape attribute for h:outputText, a Boolean flag which indicates whether to escape the HTML content or not.
By default the value is true. Set the value as escape="false".
You can find the Doc Ref HERE.

Upvotes: 2

Related Questions