116
PrimeFaces SelectManyButton
It is a multi select component using button user interface. The <p:selectManyButton> component is used to create multiple buttons. It is used to get user input by using buttons. We can create it in JSF application. It has various attributes that are tabled below.
ManyButton Attributes
Attribute | Default value | Return type | Description |
---|---|---|---|
id | null | String | It is an unique identifier of the component. |
rendered | true | Boolean | It is used to render component. It takes boolean value. |
binding | null | obejct | It is used to set an expression that maps to a server side UIComponent instance in a backing bean |
value | null | obejct | It is used to set value of the component referring to a List. |
converter | null | Converter/String | It is used to set text that defines a converter for the component. |
required | false | Boolean | It is used to make component as required |
widgetVar | null | String | It is a name of the client side widget. |
disabled | false | Boolean | It is used to disable the component. |
label | null | String | It is used to set user presentable name. |
onchange | null | String | It is used to execute script on value change. |
style | null | String | It is used to set inline CSS of the component. |
Example
Here, in the following example, we are implementing <p:selectManyButton> component. This example contains the following files.
JSF File
// manyButton.xhtml
ManagedBean
// ManyButton.java
Output:
Next TopicPrimeFaces SelectManyCheckbox