ArticlesTutorialsInterview Questions & AnswersCertificationsFree Books & Sample ChaptersTechnical Discussions  Your Account | Advertise with us | Feedback |
Few pages of this site are under construction and we are constantly trying to improve it. If you have any suggestions or ideas about how to improve the site, please Let us know.
JSF tag reference - h:inputText

« h:inputSecret JSF Tag Home h:inputTextArea »

<h:inputText>

Contents
  1. Description
  2. Example
  3. Tag Attributes
  4. Code Generator


h:inputText Description

The inputText tag is used to display a text field.

  • Use <h:inputText> tag, with optional attributes, to represent an HTML text field..
  • The id attribute can be used to specify a unique identifier for the component.
  • Use the value attribute to map the component to an underlying JavaBean’s property.
  • The rendered attribute specifies whether or not to display the component.



h:inputText Example


JSF Code Output
<h:outputLabel for="inputText" value="Enter text here: "/>
<h:inputText id="inputText" value="#{courseBean.inputText}"/>

h:inputText Attributes


Attribute Description Type
id
The unique identifier value for this component. The value must be unique within the closest naming container (e.g.,h:form or f:subview).This value must be a static value.
String
binding
The value-binding expression linking this component tag to a backing bean property.
String
rendered
A boolean value that indicates whether this component should be rendered.Default value: true.
String
value
The current value of this component.
String
converter
The converter attribute sets the converter instance to be registered for this component. It must match the converter-id value of a converter element defined in your Faces configuration file.
String
immediate
A boolean value that identifies the phase during which action events should fire. During normal event processing, action methods and action listener methods are fired during the "invoke application" phase of request processing. If this attribute is set to "true", these methods are fired instead at the end of the "apply request values" phase.
String
required The required attribute is a boolean flag that indicates whether or not the user is required to provide a value for this field before the form can be submitted to the server.String
validator A method binding EL expression, accepting FacesContext, UIComponent, and Object parameters, and returning void, that validates the component's local value. A validator method must be a public method that takes FacesContext, UIComponent, and Object parameters, with a return type of void.String
valueChangeListenerThe valueChangeListener attribute Identifies a method expression that points to a backing bean method that handles the event of entering a value in this component. A value change listener method must be a public method that takes a ValueChangeEvent parameter, with a return type of void.String
autocomplete
If the value of this attribute is "off", render "off" as the value of the attribute. This indicates that the browser should disable its autocomplete feature for this component. This is useful for components that perform autocompletion and do not want the browser interfering. If this attribute is not set or the value is "on", render nothing.
String
dir
The dir attribute is a standard HTML attribute that overrides the default text directionality for this component. The values accepted for this component are "LTR" (left-to-right) and "RTL" (right-to-left).
String
lang
Code describing the language used in the generated markup for this component
String
style
The style attribute sets the CSS style definition to be applied to this component when it is rendered.
String
title
An advisory title for this element. Often used by the user agent as a tooltip.
String
styleClass
The styleClass attribute sets the CSS class to apply to this component when it is rendered.
String
onclick
Sets the JavaScript code to execute when the mouse pointer is clicked over this element.
String
ondblclick
Sets the JavaScript code to execute when the mouse pointer is double-clicked over this element.
String
onmousedown
Sets the JavaScript code to execute when the mouse pointer is pressed down over this element.
String
onmouseup
Sets the JavaScript code to execute when the mouse button is released over this element.
String
onmouseover
Sets the JavaScript code to execute when the mouse pointer is moved onto this element.
String
onmousemove
Sets the JavaScript code to execute when the mouse pointer is moved within this element.
String
onmouseout
Sets the JavaScript code to execute when the mouse pointer is moved away from this element.
String
onkeypress
Sets the Javascript code to execute when a key is pressed and released over this element.
String
onkeydown
Sets the Javascript code to execute when a key is pressed down over this element.
String
onkeyup
Sets the Javascript code to execute when a key is released over this element.
String
onblur
Sets the Javascript code to execute when this element loses focus.
String
onfocus
Sets the Javascript code to execute when this element receives focus.
String
onselect
Sets the Javascript code to execute when text within this element is selected by the user.
String
onchange
Sets the Javascript code to execute when this element loses focus and its value has been modified since gaining
String
accesskey
The accesskey attribute is a standard HTML attribute that sets the access key that transfers focus to this element when pressed.
String
alt
The alt attribute is a standard HTML attribute that sets the alternate textual description rendered by this component.
String
align
The alt attribute is a standard HTML attribute that sets the alternate textual description rendered by this component.
String
disabled
When true, this element cannot receive focus.
String
readonlyThe readonly attribute is a boolean flag that when set to true prohibits changes to this element by the user. The element will continue to receive focus unless you set the disabled attribute to true.String
tabindex
The tabindex attribute is a standard HTML attribute that sets the order in which this element receives focus when the user cycles through the elements using the TAB key. The value for this attribute must be an integer between 0 and 32767.
String
maxlength
Sets the maximum length in characters of the string accepted by this input component.
String
size
The size attribute sets the width in characters of this input field.
String
converterMessage
Specifies an error message to display when the converter registered on the component fails.
String
requiredMessage
Specifies an error message to display when the user does not enter a value into the component.
String
validatorMessage
Specifies an error message to display when the validator registered on the component fails to validate the component’s local value.
String
More »» Code Generator
« h:inputSecret JSF Tag Home h:inputTextArea »
Test

  ALSO SEE :

About Us | Our Mission | Terms of use | Author Terms |    Search        | Contact Us | Advertise With Us | Link to Us | Sitemap
Copyright © 2016 developersBOOK.COM. All rights reserved.