Field read HTML tags in JSF

Asked

Viewed 459 times

1

I would like in my field that I will add the text and send to the database, add for example an ex link: <a href="http://www.globo.com/" ></a>, however, when printing on the screen, coming from the bank, it printed the full tag, not converting to link. How could do?

  • on which tag you are displaying the bank result?

  • you’re wearing Primefaces?

  • Yes I’m using Primefaces

  • @Alisson on which tag is trying to put the reultado?

  • 2

    I have already solved using the exhaust in an outputText field. Ex: <h:outputText value="#{beanMB.cliente.Description}" escape="false"/>. Correct?

  • @Alisson, publish the code as an answer. I’ve had the same problem.

  • 2

    As I was going to say @Alisson hehe, so just comment as an answer, it will help other people

Show 2 more comments

1 answer

2


I managed to solve using the escape in a field h:outputText.

Ex: <h:outputText value="#{beanMB.cliente.descricao}" escape="false"/>

It also works with the p:outpuLabel

Ex: <p:outputLabel value="#{beanMB.cliente.descricao}" escape="false" />

Browser other questions tagged

You are not signed in. Login or sign up in order to post.