Javatpoint Logo
Javatpoint Logo

PrimeFaces Keyboard

It is a input text box which displays virtual keyboard to enter data. It used to get user input by using pointer device. So, a user can enter input without having keyboard. The <p:keyboard> component is used to create virtual keyboard. The keyboard attributes are tabled below.

Password Attributes

Attribute Default value Type Description
password false Boolean It is used to make the input a password field.
showMode focus String It specifies the showMode.
buttonImage null String It is used to set image for the button.
ButtonImageOnly false Boolean When set to true only image of the button would be displayed.
effect fadeIn String It is used to set effect of the display animation.
effectDuration null String It is used to set length of the display animation.
layout qwerty String Set layout of the keyboard.
layoutTemplate null String It is used to set template of the custom layout.
keypadOnly focus Boolean It specifies displaying a keypad instead of a keyboard.
promptLabel null String It is used to set label of the prompt text.
closeLabel null String It is used to set label of the close key.
clearLabel null String It is used to set label of the clear key.
backspaceLabel null String It is used to set label of the backspace key.
alt null String It is used to set alternate textual description of the input field.
maxlength null Integer It is used to set maximum number of characters that may be entered in this field.
title null String It is used to set advisory tooltip information.

Example

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

JSF File

// keyboard.xhtml

ManagedBean

// Keyboard.java

Output:

PrimeFaces Keyboard 1
PrimeFaces Keyboard 2
Next TopicPrimeFaces Rating




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA