com.sun.webui.jsf.component
Class EditableField

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
                          extended by com.sun.webui.jsf.component.Field
                              extended by com.sun.webui.jsf.component.TextField
                                  extended by com.sun.webui.jsf.component.EditableField
All Implemented Interfaces:
com.sun.webui.jsf.component.ComplexComponent, javax.faces.component.EditableValueHolder, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class EditableField
extends TextField

The EditableField component renders input HTML element that is initially rendered as readOnly field and becomes editable on certain client events ( dblclick, space key)
EditableField Component class represents text input element, and it reuses much of the TextField component functionality, as well as its renderers.


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
EditableField()
          Construct a new EditableField.
 
Method Summary
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getRendererType()
          Returns the renderer type for the component.
 boolean isAutoSave()
          Test if default Ajax functionality autoSave should is on or off.
 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 setAutoSave(boolean autoSave)
          Set attribute indicating to turn on/off default autoSave functionality.
 
Methods inherited from class com.sun.webui.jsf.component.TextField
getAutoCompleteExpression, getNotify, getValueAsString, isAutoComplete, isAutoValidate, isSubmitForm, isSubmitFormSet, processUpdates, setAutoComplete, setAutoCompleteExpression, setAutoValidate, setNotify, setSubmitForm
 
Methods inherited from class com.sun.webui.jsf.component.Field
getColumns, getFocusElementId, getIndicatorComponent, getLabel, getLabelComponent, getLabeledElementId, getLabelLevel, getMaxLength, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getPrimaryElementID, getReadOnlyComponent, getStyle, getStyleClass, getTabIndex, getText, getToolTip, getValue, getValueExpression, isDisabled, isReadOnly, isRequired, isTrim, isVisible, setColumns, setDisabled, setLabel, setLabelLevel, setMaxLength, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setReadOnly, setStyle, setStyleClass, setTabIndex, setText, setToolTip, setTrim, setValueExpression, setVisible
 
Methods inherited from class com.sun.webui.jsf.component.HiddenField
getHtmlTemplate, getReadOnlyValueString, setHtmlTemplate
 
Methods inherited from class com.sun.webui.jsf.component.WebuiInput
broadcast, getValidator, getValidatorExpression, getValueChangeListener, getValueChangeListenerExpression, processDecodes, 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

EditableField

public EditableField()

Construct a new EditableField.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Currently, due to unresolved one-to-one mapping between component family and renderers, in order to use jsfx.TextFieldRenderer this method will substitute the family of the component on the fly. This may change in future when TextField and EditableField both can be made to belong to the same family of components.

Overrides:
getFamily in class TextField

getRendererType

public java.lang.String getRendererType()
Returns the renderer type for the component. Depending on the type of the request, this method will return the default renderer type of "com.sun.webui.jsf.widget.EditableField", or "com.sun.webui.jsf.ajax.TextField" in case of ajax request. Ajax request represents a special case of request, when partial data is rendered back to the client.

Overrides:
getRendererType in class TextField

isAutoSave

public boolean isAutoSave()
Test if default Ajax functionality autoSave should is on or off.


setAutoSave

public void setAutoSave(boolean autoSave)
Set attribute indicating to turn on/off default autoSave functionality.


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 TextField

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 TextField


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