(Quick Reference)
p:button
Purpose
Renders a text-based button as either a <button>, <a> or <input type="submit"> based on the supplied options.
The text is loaded from i18n if required.
Example
<p:button>OK</p:button>
<p:button text="button.ok"/>
<p:button enabled="false">Cancel</p:button>
<p:button kind="anchor" href="#" text="button.cancel"/>
<p:button kind="submit" text="button.send.to" textArgs="${recipient.name}"/>
Attributes
Name | Purpose |
---|
kind | What kind of button to render. Value can be "button" (the default), or "anchor" or "submit" |
text | The text of the button, or an i18n code to resolve to use as the text |
textArgs | Optional arguments to pass when creating the i18n message text |
Any other attributes specified are passed through to the output.