|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
javax.faces.component.UIInput
com.sun.webui.jsf.component.WebuiInput
com.sun.webui.jsf.component.HiddenField
com.sun.webui.jsf.component.Field
com.sun.webui.jsf.component.PasswordField
public class PasswordField
The PasswordField component is used to create a password textfield.
Field Summary |
---|
Fields inherited from class com.sun.webui.jsf.component.Field |
---|
INPUT_ID, LABEL_FACET, LABEL_ID, READONLY_FACET, READONLY_ID |
Fields inherited from class javax.faces.component.UIInput |
---|
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID |
Fields inherited from interface javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
PasswordField()
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
getFamily()
Return the family for this component. |
java.lang.Object |
getPassword()
Value binding. |
java.lang.String |
getReadOnlyValueString(javax.faces.context.FacesContext context)
Return the value to be rendered as a string when the component is readOnly. |
java.lang.Object |
getText()
Literal value to be rendered in this input field. |
java.lang.Object |
getValue()
|
java.lang.String |
getValueAsString(javax.faces.context.FacesContext context)
Return the empty Srting to be rendered This is done in order to avoid sending secret password back to the client where it can be sniffed by viewing the source code of the page. |
javax.el.ValueExpression |
getValueExpression(java.lang.String name)
Return the ValueExpression stored for the
specified name (if any), respecting any property aliases. |
boolean |
isSubmitForm()
Flag indicating whether pressing enter in this text field would allow browser to submit the enclosing form. |
boolean |
isSubmitFormSet()
Returns true if submitForm attribute has been explicitely set, either through binding, value expression, or programmatically. |
void |
restoreState(javax.faces.context.FacesContext _context,
java.lang.Object _state)
Restore the state of this component. |
java.lang.Object |
saveState(javax.faces.context.FacesContext _context)
Save the state of this component. |
void |
setPassword(java.lang.Object password)
Literal value to be rendered in this input field. |
void |
setSubmitForm(boolean submitForm)
Flag indicating whether pressing enter in this text field would allow browser to submit the enclosing form. |
void |
setValueExpression(java.lang.String name,
javax.el.ValueExpression binding)
Set the ValueExpression stored for the
specified name (if any), respecting any property
aliases. |
Methods inherited from class com.sun.webui.jsf.component.HiddenField |
---|
getHtmlTemplate, getRendererType, setHtmlTemplate |
Methods inherited from class com.sun.webui.jsf.component.WebuiInput |
---|
broadcast, getValidator, getValidatorExpression, getValueChangeListener, getValueChangeListenerExpression, processDecodes, processUpdates, processValidators, setConverter, setId, setImmediate, setRendered, setRequired, setValidatorExpression, setValueChangeListenerExpression |
Methods inherited from class javax.faces.component.UIInput |
---|
addValidator, addValueChangeListener, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidatorMessage, getValidators, getValueChangeListeners, isImmediate, isLocalValueSet, isValid, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setLocalValueSet, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate |
Methods inherited from class javax.faces.component.UIOutput |
---|
getConverter, getLocalValue |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getContainerClientId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.faces.component.ValueHolder |
---|
getConverter, getLocalValue |
Constructor Detail |
---|
public PasswordField()
Method Detail |
---|
public java.lang.String getFamily()
Return the family for this component.
getFamily
in class Field
public java.lang.String getReadOnlyValueString(javax.faces.context.FacesContext context)
Return the value to be rendered as a string when the component is readOnly. The value will be represented using asterisks.
getReadOnlyValueString
in class HiddenField
context
- FacesContext for the current request
public javax.el.ValueExpression getValueExpression(java.lang.String name)
Return the ValueExpression
stored for the
specified name (if any), respecting any property aliases.
getValueExpression
in class Field
name
- Name of value binding expression to retrievepublic void setValueExpression(java.lang.String name, javax.el.ValueExpression binding)
Set the ValueExpression
stored for the
specified name (if any), respecting any property
aliases.
setValueExpression
in class Field
name
- Name of value binding to setbinding
- ValueExpression to set, or null to removepublic java.lang.Object getText()
Field
Literal value to be rendered in this input field. If this property is specified by a value binding expression, the corresponding value will be updated if validation succeeds.
getText
in class Field
public java.lang.Object getValue()
getValue
in interface javax.faces.component.ValueHolder
getValue
in class Field
public java.lang.Object getPassword()
Value binding. While no password data will be rendered on the client side, if this property is specified by a value binding expression, the corresponding value will be updated if validation succeeds.
public void setPassword(java.lang.Object password)
Literal value to be rendered in this input field. If this property is specified by a value binding expression, the corresponding value will be updated if validation succeeds.
getPassword()
public boolean isSubmitForm()
Flag indicating whether pressing enter in this text field would allow browser to submit the enclosing form.
public void setSubmitForm(boolean submitForm)
Flag indicating whether pressing enter in this text field would allow browser to submit the enclosing form.
isSubmitForm()
public boolean isSubmitFormSet()
Returns true if submitForm attribute has been explicitely set, either through binding, value expression, or programmatically. Returns false otherwise.
public java.lang.String getValueAsString(javax.faces.context.FacesContext context)
Return the empty Srting to be rendered
This is done in order to avoid
sending secret password back to the client where it can be sniffed by viewing the
source code of the page.
Sending masked string
such as set of asterisks would have confused the issue further as it could create an impression that
password is saved on the client in the field in some meaningful state, which in reality it will be not.
Thus, the password field will be rendered empty after each page submit,
prompting user ( or browser if such functionality is enabled ) to reenter password
getValueAsString
in class HiddenField
context
- FacesContext for the current request
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class Field
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class Field
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |