Search code examples
oracle-adf

Read a text from managed bean and style it before displaying it in a pop-up


I have to read a text from a managed bean, and then display the text in a pop-up. The pop-up gets displayed when a link is clicked. The requirement is to style the text, change the color and bold some portion of the text before displaying on the web page. I'm able to display the text with the tags on the web page but the text is not getting bold. Please help me with the solutions to it. Thank you!

<af:popup id="testPopup"> <af:dialog id="d2" type="ok"> <af:outputText value="TEST DESCRIPTION" id="ot2"/> <af:panelBox text="" id="pb5" showDisclosure="false"> <af:outputFormatted value="#{pageFlowScope.TestBean.testMessage}" id="ot3" inlineStyle="width:300px;display:inline-block;word- wrap:break-word"/> </af:panelBox> </af:dialog> </af:popup>

//Bean: String testMessage = "<b>Lorem ipsum</b> dolor sit amet, consectetur adipiscing elit. Quisque r finibus consequat. Praesent egestas veneet euismod magna."


Solution

  • Tell us your exact jdev version, please. If you run a .jspx page you should escape the '<' as ⁢ Try
    <af:outputFormatted value="&lt;b>Bold&lt;/b> not bold" id="of1"/>

    Timo