pe:clipboard copy text from bean?

Community Driven Extensions Project
Post Reply
vished
Posts: 479
Joined: 02 Feb 2014, 17:38

14 Sep 2018, 09:18

Dear all,

I would like to copy a huge text from my bean. I don´t want to display this text in my JSF page...
It seems it´s not working like:
<pe:clipboard id="clipAjax"
trigger="btnCopyPredefinedText" action="copy" text="#{emailReceiverInboxController.textHtml}"
target="predefinedTextLanguageHidden">
<p:ajax event="success"
listener="#{emailReceiverInboxController.clipboardSuccessListener}" />
</pe:clipboard>
Any ideas?
PF 8.0

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

14 Sep 2018, 13:12

So you want it on a button press called "btnCopyPredefinedText right?

Try this..

Code: Select all

<p:button id="btnCopyPredefinedText" value="Copy" icon="fa fa-copy" href="#" /> 
 
<pe:clipboard id="clipboard" trigger="btnCopyPredefinedText" action="copy" text="#{emailReceiverInboxController.textHtml}"  />  
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests