How do I put line break in p:tooltip

UI Components for JSF
Post Reply
Posts: 1
Joined: 12 Feb 2019, 10:37

28 Mar 2019, 06:44

How can I put a line break to the tooltip primefaces component to separate the first line from the second line?

Code: Select all

<p:tooltip id="toolTip" for="idButton" value="First line Second Line" position="top"/>

Posts: 2
Joined: 07 Mar 2019, 15:20

28 Mar 2019, 12:49

Try this.

Code: Select all

	<h:button id="backButton" value="Back" />
	<p:tooltip showDelay="600" for="backButton">
		<p:outputPanel layout="inline">
			<h:outputText value="line1" /><br />
			<h:outputText value="line2" /><br />
			line3<br />line4

Posts: 1581
Joined: 22 Apr 2013, 15:48

28 Mar 2019, 13:59

Another option...

Code: Select all

<p:tooltip id="toolTip" for="idButton" value="First line<br/>Second Line" position="top" escape="false"/>
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile:
PrimeFaces Elite 7.0.11 / PF Extensions 7.0.3

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot], tdtappe and 16 guests