Javatpoint Logo
Javatpoint Logo

PrimeFaces SplitButton

It is a button which displays a default command and additional ones in an overlay. It is used to provide multiple commands. The <p:splitButton> component is used to create splitButton in JSF application. The following table contains important attributes of this component.

SplitButton Attributes

Attribute Default value Type Description
id null String It is an unique identifier of the component.
value null String It is used to set label for the button.
action null MethodE xpr/String It is a method expression or a String outcome that?d be processed when button is clicked.
actionListener null MethodE xpr It is used to set action listener.
type submit String It sets the behavior of the button.
ajax true Boolean It specifies the submit mode, when set to true(default), submit would be made with Ajax.
Async false Boolean When set to true, ajax requests are not queued.
process null String It sets component to process partially instead of whole view.
Update null String It sets component to be updated with ajax.
onstart null String It is used to execute client script before ajax request is begins.
global true boolean It defines whether to trigger ajaxStatus or not.
delay null String It is used to set delay time.
timeout 0 Integer It is used to set timeout for the ajax request in milliseconds.
style null String It is used to set inline CSS of the button element.

Example

Here, in the following example, we are implementing <p:splitButton> component. This example contains the following files.

JSF File

// splitButton.xhtml

ManagedBean

// SplitButton.java

Output:

PrimeFaces SplitButton 1
PrimeFaces SplitButton 2
PrimeFaces SplitButton 3




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA