📜  Primefaces键盘

📅  最后修改于: 2021-01-08 04:20:21             🧑  作者: Mango

PrimeFaces键盘

它是一个输入文本框,显示用于输入数据的虚拟键盘。它过去是通过使用指针设备来获取用户输入的。因此,用户无需键盘即可输入输入。 组件用于创建虚拟键盘。键盘属性如下表所示。

密码属性

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.

在下面的示例中,我们正在实现组件。本示例包含以下文件。

JSF文件

// keyboard.xhtml





keyboard








ManagedBean

// Keyboard.java

package com.javatpoint;
import javax.faces.bean.ManagedBean;
@ManagedBean
public class Keyboard {
private String value;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

输出: