Primefaces users guide 3 5

Page 407

PrimeFaces User’s Guide

Name

Default

Type

Description

onmouseup

null

String

Client side callback to execute when a pointer button is released over button.

onselect

null

String

Client side callback to execute when text within button is selected by user.

accesskey

null

String

Access key that when pressed transfers focus to the button.

alt

null

String

Alternate textual description of the button.

dir

null

String

Direction indication for text that does not inherit directionality. Valid values are LTR and RTL.

disabled

FALSE

Boolean

Disables the button.

image

null

String

Style class for the button icon. (deprecated: use icon)

label

null

String

A localized user presentable name.

lang

null

String

Code describing the language used in the generated markup for this component.

tabindex

null

Integer

Position of the button element in the tabbing order.

title

null

String

Advisory tooltip information.

readonly

FALSE

Boolean

Flag indicating that this component will prevent changes by the user.

icon

null

String

Icon of the button as a css class.

iconPos

left

String

Position of the icon.

widgetVar

null

String

Name of the client side widget.

Getting started with SplitButton SplitButton usage is similar to a regular commandButton. Additional commands are placed inside the component and displayed in an overlay. In example below, clicking the save button invokes save method of the bean and updates messages. Nested options defined as menuitems do ajax, non-ajax requests as well as regular navigation to an external url. <p:splitButton value="Save" actionListener="#{buttonBean.save}" update="messages" icon="ui-icon-disk"> <p:menuitem value="Update" actionListener="#{buttonBean.update}" update="messages" icon="ui-icon-arrowrefresh-1-w"/> <p:menuitem value="Delete" actionListener="#{buttonBean.delete}" ajax="false" icon="ui-icon-close"/> <p:separator /> <p:menuitem value="Homepage" url="http://www.primefaces.org" icon="ui-icon-extlink"/> </p:splitButton>

407


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.