pe:clipboard copy text from bean?

Community Driven Extensions Project
Post Reply
vished
Posts: 243
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?

User avatar
Melloware
Posts: 765
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 Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2.10 / PF Extensions 6.2.9

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest