@Generated(value={"RichFaces CDK","4.5.0-SNAPSHOT"}) public class UIFocus extends AbstractFocus implements AjaxOutput
Focus component allows to set focus based on validation of components or alternatively it can preserve focus on currently focused form input.
Focus can be bound to form (in case of placement to h:form) or to whole view (when placed outside of forms) - in latter case, all forms will be managed by one Focus. There can be at most one Focus per form. When there is one view-scoped Focus and form defines own Focus, form-scoped Focus settings will be used.
Focus is applied each time the component is rendered - for each full page submit and for each partial page request (in case of ajaxRendered=true). Alternatively, you can use JavaScript API: applyFocus() function will immediately cause.
Modifier and Type | Class and Description |
---|---|
protected static class |
UIFocus.Properties |
AbstractFocus.Mode
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
Constructor and Description |
---|
UIFocus() |
Modifier and Type | Method and Description |
---|---|
String |
getFamily() |
boolean |
isAjaxRendered()
Defines whether focus state should be updated during each AJAX request automatically.
|
boolean |
isDelayed()
Defines whether focus should not be applied after initial page load, but will need to be triggered by JavaScript function
from Focus API: applyFocus() or via re-rendering (postback).
|
boolean |
isKeepTransient()
Hide keepTransient attribute from AjaxOutput
|
boolean |
isPreserve()
Defines whether focus should be preserved on last focused input before request was done (default: false)
|
boolean |
isValidationAware()
Defines if focus should respect validation of inputs.
|
void |
setAjaxRendered(boolean ajaxRendered)
Setter for ajax rendered property.
|
void |
setDelayed(boolean delayed) |
void |
setKeepTransient(boolean keepTransient)
Setter for keep transient property.
|
void |
setPreserve(boolean preserve) |
void |
setValidationAware(boolean validationAware) |
getMode, processEvent
clearInitialState, getConverter, getLocalValue, getValue, markInitialState, resetValue, restoreState, saveState, setConverter, setValue
addClientBehavior, addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public String getFamily()
getFamily
in class javax.faces.component.UIOutput
public boolean isAjaxRendered()
AbstractFocus
isAjaxRendered
in interface AjaxOutput
isAjaxRendered
in class AbstractFocus
public void setAjaxRendered(boolean ajaxRendered)
AjaxOutput
setAjaxRendered
in interface AjaxOutput
public boolean isDelayed()
AbstractFocus
isDelayed
in class AbstractFocus
public void setDelayed(boolean delayed)
public boolean isKeepTransient()
AbstractFocus
isKeepTransient
in interface AjaxOutput
isKeepTransient
in class AbstractFocus
public void setKeepTransient(boolean keepTransient)
AjaxOutput
setKeepTransient
in interface AjaxOutput
public boolean isPreserve()
AbstractFocus
isPreserve
in class AbstractFocus
public void setPreserve(boolean preserve)
public boolean isValidationAware()
AbstractFocus
Defines if focus should respect validation of inputs.
If true, only invalid form fields will be focused when focus applied.
(default: true)
isValidationAware
in class AbstractFocus
public void setValidationAware(boolean validationAware)
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.