com.sun.webui.jsf.component
Class HiddenField

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by com.sun.webui.jsf.component.WebuiInput
                      extended by com.sun.webui.jsf.component.HiddenField
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder
Direct Known Subclasses:
Field

public class HiddenField
extends WebuiInput

The HiddenField component is used to create a hidden input field.


Field Summary
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Constructor Summary
HiddenField()
          Creates a new instance of HiddenField
 
Method Summary
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getHtmlTemplate()
          Get alternative HTML template to be used by this component.
 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.String getRendererType()
           
 java.lang.Object getText()
          Literal value to be rendered in this hidden field.
 java.lang.Object getValue()
           
 java.lang.String getValueAsString(javax.faces.context.FacesContext context)
          Return the value to be rendered, as a String (converted if necessary), or null if the value is null.
 javax.el.ValueExpression getValueExpression(java.lang.String name)
          Return the ValueExpression stored for the specified name (if any), respecting any property aliases.
 boolean isDisabled()
           
 boolean isRequired()
           
 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 setDisabled(boolean disabled)
          Flag indicating that the hidden field should not send its value to the server.
 void setHtmlTemplate(java.lang.String htmlTemplate)
          Set alternative HTML template to be used by this component.
 void setText(java.lang.Object text)
          Literal value to be rendered in this hidden field.
 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.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

HiddenField

public HiddenField()
Creates a new instance of HiddenField

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class javax.faces.component.UIInput

getRendererType

public java.lang.String getRendererType()
Overrides:
getRendererType in class javax.faces.component.UIComponentBase

getReadOnlyValueString

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 default behaviour is to invoke getValueAsString(). Override this method in case a component needs specialized behaviour.

Parameters:
context - FacesContext for the current request
Returns:
A String value of the component

getValueAsString

public java.lang.String getValueAsString(javax.faces.context.FacesContext context)

Return the value to be rendered, as a String (converted if necessary), or null if the value is null.

Parameters:
context - FacesContext for the current request
Returns:
A String value of the component

getValueExpression

public javax.el.ValueExpression getValueExpression(java.lang.String name)

Return the ValueExpression stored for the specified name (if any), respecting any property aliases.

Overrides:
getValueExpression in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding expression to retrieve

setValueExpression

public void setValueExpression(java.lang.String name,
                               javax.el.ValueExpression binding)

Set the ValueExpression stored for the specified name (if any), respecting any property aliases.

Overrides:
setValueExpression in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding to set
binding - ValueExpression to set, or null to remove

getHtmlTemplate

public java.lang.String getHtmlTemplate()
Get alternative HTML template to be used by this component.


setHtmlTemplate

public void setHtmlTemplate(java.lang.String htmlTemplate)
Set alternative HTML template to be used by this component.


isRequired

public boolean isRequired()
Specified by:
isRequired in interface javax.faces.component.EditableValueHolder
Overrides:
isRequired in class javax.faces.component.UIInput

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface javax.faces.component.ValueHolder
Overrides:
getValue in class javax.faces.component.UIOutput

isDisabled

public boolean isDisabled()

setDisabled

public void setDisabled(boolean disabled)

Flag indicating that the hidden field should not send its value to the server.

See Also:
isDisabled()

getText

public java.lang.Object getText()

Literal value to be rendered in this hidden field. If this property is specified by a value binding expression, the corresponding value will be updated if validation succeeds.


setText

public void setText(java.lang.Object text)

Literal value to be rendered in this hidden field. If this property is specified by a value binding expression, the corresponding value will be updated if validation succeeds.

See Also:
getText()

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class WebuiInput

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class WebuiInput


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.