org.apache.myfaces.custom.focus2
Class AbstractHtmlFocus

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 org.apache.myfaces.custom.focus2.AbstractHtmlFocus
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public abstract class AbstractHtmlFocus
extends javax.faces.component.UIInput

Version:
$Revision: 676957 $ $Date: 2008-07-15 11:41:17 -0500 (Tue, 15 Jul 2008) $
Author:
Rogerio Pereira Araujo (latest modification by $Author: skitching $)

Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
AbstractHtmlFocus()
           
 
Method Summary
 java.lang.String getFamily()
           
abstract  java.lang.String getFocusAndSubmitOnEnter()
          Defines an id of a command-button or command-link that will be focussed and submitted when the enter-key is pressed.
abstract  java.lang.String getOverrideFocusId()
          The id (locally in this naming container) of the component which should receive the focus.
 java.lang.Object getValue()
           
abstract  boolean isFocusOnError()
          Defines that the first element of the form with an associated error should receive the focus by default (if the override focus-id attribute wasn't set).
abstract  boolean isFocusOnFirst()
          Defines that the first element of the form should receive the focus by default (if the overrideFocusId-attribute is not specified, no error has been queued and the focus has not already been set).
 void processValidators(javax.faces.context.FacesContext context)
           
 void setValue(java.lang.Object value)
          The client-id (fully specified as a concatenation of the id of this component and all naming container parent ids) of the component which receives the focus (works only if overrideFocusId hasn't been set and no error has been queued).
 void updateModel(javax.faces.context.FacesContext context)
           
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValueChangeListener, validate, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

public static final java.lang.String DEFAULT_RENDERER_TYPE
See Also:
Constant Field Values
Constructor Detail

AbstractHtmlFocus

public AbstractHtmlFocus()
Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIInput

isFocusOnFirst

public abstract boolean isFocusOnFirst()
Defines that the first element of the form should receive the focus by default (if the overrideFocusId-attribute is not specified, no error has been queued and the focus has not already been set).


isFocusOnError

public abstract boolean isFocusOnError()
Defines that the first element of the form with an associated error should receive the focus by default (if the override focus-id attribute wasn't set).

Returns:

getOverrideFocusId

public abstract java.lang.String getOverrideFocusId()
The id (locally in this naming container) of the component which should receive the focus. Overrides all other behaviour if set.


getFocusAndSubmitOnEnter

public abstract java.lang.String getFocusAndSubmitOnEnter()
Defines an id of a command-button or command-link that will be focussed and submitted when the enter-key is pressed.


setValue

public void setValue(java.lang.Object value)
The client-id (fully specified as a concatenation of the id of this component and all naming container parent ids) of the component which receives the focus (works only if overrideFocusId hasn't been set and no error has been queued). The value will automatically be updated when the focus is changed.

Specified by:
setValue in interface javax.faces.component.ValueHolder
Overrides:
setValue in class javax.faces.component.UIInput
See Also:
UIInput.setValue(java.lang.Object)

getValue

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

updateModel

public void updateModel(javax.faces.context.FacesContext context)
Overrides:
updateModel in class javax.faces.component.UIInput

processValidators

public void processValidators(javax.faces.context.FacesContext context)
Overrides:
processValidators in class javax.faces.component.UIInput


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.