📜  Primefaces Inputtext

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

PrimeFaces InputText

它是具有外观功能的标准inputText的扩展。我们可以使用组件来创建它。它用于在JSF应用程序中获取用户输入。它包括下表中列出的各种属性。

InputText属性

Attribute Default value Return type Description
id null String It is an unique identifier of the component.
rendered true Boolean It is used to specify the rendering of the component.
value null Object It is used to set value of the component.
required false Boolean It is used to make component as required.
accesskey null String It is used to set access key for the component.
alt null String It is used to set alternate textual description of the input field.
autocomplete null String It is used to set autocomplete behavior.
dir null String It is a direction indication for text.
lang null String It is used to set language of the component.
maxlength null Integer It is used to set maximum number of characters that may be entered in this
field.
placeholder null String It is used to specify a short hint.
readonly 0 Boolean It is used to set this component readonly.
size null Integer It is used to set size of the component.
style null String It is used to set inline CSS of the component.
title null String It provides advisory tooltip.
type text String It is used to set type of input.

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

JSF文件

// inputText.xhtml





InputText






此JSF页面产生以下输出。

输出: