Clipboard Clipboard is for copying text to the clipboard. It shouldn't be hard and it shouldn't require dozens of steps to configure or hundreds of KBs to load. But most of all, it shouldn't depend on Flash or any bloated framework.

Based on Clipboard.js by Zeno Rocha.
Browser Supported
Components and more
Use Cases
Documentation pe:clipboard
Attributes (move mouse over the names to see data types)
Name Description
id Unique identifier of the component in a namingContainer.
rendered Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding An el expression referring to a server side UIComponent instance in a backing bean.
widgetVar Name of the client side widget.
action Action whether to 'copy' or 'cut'. Default is 'copy'.
trigger The trigger to execute the action. Typically a button.
target The target component to copy/cut the text from.
text If you don't use target you can set text to the value you want copied/cut. Default is 'PrimeFaces Rocks!' if you forget to set it.
onsuccess Javascript handler to execute if text is successfully copied/cut.
onerror Javascript handler to execute when text fails to copy/cut to clipboard.
Events (move mouse over the names to see classes)
Name Description
successfires when the clipboard sucessfully copies/cuts
errorfires when the clipboard fails to copy/cut
PrimeFaces Extensions Showcase - © 2011-2021,PrimeFaces: 11.0.0,PrimeFaces Extensions: 11.0.3,JSF: Apache MyFaces JSF-2.3 Core API 2.3.9,Server: jetty/9.4.36.v20210114,Build time: 2022-04-17 14:55