You see the Properties window for a JavaServer Faces Secret Field component when you select the component on a page that you are editing in the Visual Designer.
This standard JavaServer Faces component has the following properties.
General
id. Type: text
The name of the Secret Field component in the page bean and the JSP file.
Appearance
alt. Type: String
The contents of the alt attribute for the component, which contains text that describes the component in the HTML page and is readable by screen readers.
disabled. Type: boolean
If selected, indicates that the component should never receive focus or be included in a submit. See the note under the readonly property concerning the effects of using the disabled property versus the effects of using the readonly property.
readonly. Type: boolean
If selected, makes it impossible for the user to enter text, but still makes it possible for the component's value to be submitted.
A readonly field is included when the page is submitted, in contrast to a disabled field, which is not. In nearly every case where you might think that you should use the disabled property to disallow the user from changing the value, you should be using the readonly property instead. If you use the disabled property, JavaServer Faces does not detect that any value at all was submitted.
size. Type: int
The default width of the field in characters.
style. Type: String
Cascading Style Sheet rules (CSS level 2) to be applied to the component. This property overrides any settings in the project CSS file. For example:
position: absolute; left: 288px; top: 312px
You can enter values directly or click the ellipsis (...) button to use the Style Editor.
For a list of CSS2 style attributes, see the web page at
styleClass. Type: String
A space-separated list of CSS2 style classes to be applied when the component is rendered. The style classes must be defined in the project's style sheet. If you click the ellipsis button (...), you see a list of all styles you can add to this property. For information on adding CSS classes and rules to the project's cascading style sheet, see CSS Editor.
title. Type: String
Information about the component that is readable by a screen reader and can be displayed as a tool tip.
If the component is disabled, the tool tip will not display in most browsers.
Data
converter. Type: Converter
A JavaServer Faces converter that produces the correct type of value for the value property. If the user enters the wrong type of value, such as a word instead of a number for an Integer converter, the converter sends a message that you can display in an Inline Message component.
maxlength. Type: int
The maximum number of characters that the component will accept.
required. Type: boolean
If selected, the user must enter a value for the component before the page can be submitted. If the user does not enter anything and tries to submit the page, what they see is that the submit does not appear to do anything. You must add code that provides a message if you want the user to be notified that they must enter text.
validator. Type: MethodBinding
Indicates the JavaServer Faces validator that is called when the value is submitted. Choose a validator from the drop down list. If you choose (null), no validator is called. If the conditions defined by the validator are not met, the validator sends a message that you can display in an Inline Message component.
If you choose a validator, you can also select the required property to ensure that the validator receives a value.
If you define your own validate method, for example, by right-clicking the component and choosing Edit Event Handler > validate, any validator you might have specified in this property is overridden by your validation method's name.
value. Type: Object
The password that the user enters. You can also specify a default value for this property, or you can click the ellipsis button and bind the property to a database table or object so the property's value can be set automatically (for example, so users can have their passwords saved and automatically entered for them).
Events
Set the event properties by right-clicking the component in the Visual Designer and choosing Edit Event Handler > eventname.
validate. Indicates the name of the method that is called to validate the value of the component. If you want to code a validator method rather than choosing a JavaServer Faces validator for the validator property, right-click the component and choose Edit Event Handler > validate. The default name for the method is component-id_validate, where component-id is the value of the component's id property. When you define this method in this way, the validator and validate properties are automatically set for you. If you define a validator, also select the required property to ensure that the validator is used.
Setting this property also sets the value of the validator property. If you define your own validate method, do not separately change the value of the validator property, or you could lose the connection to your validate method.
valueChange. Indicates the name of the component value change listener method that is called when the value of the component changes. You typically define this method in the page bean by right-clicking the component in the Navigator window and choosing Edit Event Handler > processValueChange. The default name for the method is component-id_processValueChange, where component-id is the value of the id property.
JavaScript
onblur. Type: String
JavaScript to be executed when the component loses focus.
onchange. Type: String
JavaScript to be executed when the component loses focus and its value was modified after it gained focus.
onclick. Type: String
JavaScript to be executed when the user clicks the component.
ondblclick. Type: String
JavaScript to be executed when the user double-clicks the component.
onfocus. Type: String
JavaScript to be executed when the component gains focus.
onkeydown. Type: String
JavaScript to be executed when the component has focus and a key is pressed.
onkeypress. Type: String
JavaScript to be executed when the component has focus and a key is pressed and released.
onkeyup. Type: String
JavaScript to be executed when the component has focus and a key is released.
onmousedown. Type: String
JavaScript to be executed when the mouse cursor is over the component and the user presses down on the mouse button.
onmousemove. Type: String
JavaScript to be executed when the user moves the mouse cursor within the component.
onmouseout. Type: String
JavaScript to be executed when the user moves the mouse cursor away from the component after it has been over the component.
onmouseover. Type: String
JavaScript to be executed when the user moves the mouse cursor onto the component.
onmouseup. Type: String
JavaScript to be executed when the mouse cursor is over the component and the user releases the mouse button.
onselect. Type: String
JavaScript to be executed when the user selects text in the component.
Advanced
accesskey. Type: String
A keyboard key, or keyboard shortcut, that activates this component. You can enter any valid character that can be pressed on the keyboard. Equivalent to the accesskey attribute of the HTML <input> tag.
dir. Type: String
An indicator of the directionality if the text does not inherit directionality (for example, because the text is English but the primary language for the page is Hebrew). Equivalent to the dir attribute of the HTML <input> tag.
Values can be:
LTR. Left-to-right.
RTL. Right-to-left.
immediate. Type: boolean
If this property is selected, when the user activates the component, the code in the page bean is executed before the validation, updating of model values, and so on. Essentially, code execution happens right away on the server, which then returns the page.
The most common example of an immediate action is a Cancel button. You make it immediate so that the normal validation and update steps can be skipped, but the action handler can still do whatever is necessary. Typically, the action handler will navigate back to some previous page. In some designs the action handler might also enqueue an informational message like "Transaction cancelled". It is possible to do more: for example, an application might record the fact that the user got partially through a form and then cancelled it.
lang. Type: String
Code describing the language used in the generated markup for the component. Equivalent to the lang attribute of the HTML <input> tag. To choose a language code, you can click the ellipsis button (...) to open the property editor. Some examples:
ar - Traditional Arabic
de - German
en - English
es - Spanish
fr - French
ja - Japanese
In addition to the codes available in the property editor, you can also enter additional codes using ISO standard names. Some examples:
en-US - United States English
ja-JP - Japanese
zh-guoyu - Mandarin or Standard Chinese
zh-Hans - Simplified Chinese script
zh-HanT - Traditional Chinese script
redisplay. Type: boolean
If selected, any existing value in the secret field is rendered when the page is created. For a secret field, this property is unselected by default for security reasons.
rendered. Type: boolean
If selected, the field is to be rendered and processed on any subsequent page submission. If not selected, the field does not appear on the page at all, not even as a hidden component. You can bind this property to a variable that determines when the field does get rendered. For example, an airline reservation form might show a text field for frequent flyers and not show it for the general public. To bind this property, right-click the component in the Visual Designer and choose Property Bindings, and then select the All radio button to display all properties so you can select the rendered property.
tabindex. Type: String
Optionally specifies the position of the field in the tab order of the document, determining when the component gets focus if the user tabs through the document. The value must be an integer between 0 and 32767. This property is equivalent to the tabindex attribute of the HTML <input> tag.
valueChangeListener. Type: MethodBinding
See the Event section's valueChange property above, which provides an easier way to set this property's value. The valueChangeListener property is the MethodBinding property that underlies the valueChange event property. The valueChangeListener property is updated when you set the method for the valueChange event property.
If you click the ellipsis button next to the valueChange property, you can use that property's property editor to choose an existing method to bind to, or you can create a new method or unbind an existing method. If you are an expert, instead of using the valueChange property, you can type a MethodBinding expression directly into this valueChangeListener property, for example, if you want to call a method that is not in the page bean.