The <tc:in/> tag create a classic input field.
<tc:in/>
In most cases, a label should be placed in front of every input field. Use the attribute label.
label
The following input field should be selected after reloading the page. Use the focus attribute.
focus
An input field can be set as required with the required attribute. Such an input field must contain a value, otherwise a submit is not possible. Leave the field blank and press 'submit' to see the error message.
required
A help text can be added with the help attribute.
help
To create an input field for passwords, set the password attribute to 'true'. It will hide the text as shown in the following example.
password
A placeholder attribute can be used for explaining a user the meaning of a field.
placeholder
The text of the placeholder is only shown if the value is an empty string.
There are some markups available for input fields.
The autocomplete attribute can be used for explaining a user the meaning of a field.
autocomplete
The output field in this example, displays the given value on the server. With <f:ajax event="input" render="outputAjax" listener="#{inController.update}"/>, the output field will be rerendered, after the value has been changed. Additional, the listener attribute is set. The given method is called after the input field loose focus.
<f:ajax event="input" render="outputAjax" listener="#{inController.update}"/>
listener