Top Description Fields Constructors Methods
com.sun.faces.ext.taglib

public Class FocusTag

extends UIComponentELTag
Class Inheritance
Imports
javax.faces.webapp.UIComponentELTag, javax.faces.component.UIComponent, javax.el.ValueExpression

Tag to set focus to a given field. Uses a single attribute, for, which is the id of the field which should receive the focus.
Author
driscoll

Field Summary

Modifier and TypeField and Description
private static final String
public ValueExpression
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getComponentType()

Implements abstract javax.faces.webapp.UIComponentTagBase.getComponentType.

Return the component type for the component that is or will be bound to this tag.

public String
getRendererType()

Implements abstract javax.faces.webapp.UIComponentTagBase.getRendererType.

Return the rendererType property that selects the Renderer to be used for encoding this component, or null to ask the component to render itself directly.

public void
release()

Overrides javax.faces.webapp.UIComponentELTag.release.

Implements javax.servlet.jsp.tagext.Tag.release.

Release any resources allocated during the execution of this tag handler.

public void
protected void
setProperties(UIComponent
UIComponent whose properties are to be overridden
component
)

Overrides javax.faces.webapp.UIComponentELTag.setProperties.

Override properties and attributes of the specified component, if the corresponding properties of this tag handler instance were explicitly set.

Inherited from javax.faces.webapp.UIComponentELTag:
createComponentgetELContexthasBindingsetBindingsetRendered

Field Detail

COMPONENT_TYPEback to summary
private static final String COMPONENT_TYPE
forIDback to summary
public ValueExpression forID
RENDERER_TYPEback to summary
private static final String RENDERER_TYPE

Constructor Detail

FocusTagback to summary
public FocusTag()

Method Detail

getComponentTypeback to summary
public String getComponentType()

Implements abstract javax.faces.webapp.UIComponentTagBase.getComponentType.

Doc from javax.faces.webapp.UIComponentTagBase.getComponentType.

Return the component type for the component that is or will be bound to this tag. This value can be passed to javax.faces.application.Application#createComponent to create the UIComponent instance for this tag. Subclasses must override this method to return the appropriate value.

Returns:String

the component type

Annotations
@Override
getRendererTypeback to summary
public String getRendererType()

Implements abstract javax.faces.webapp.UIComponentTagBase.getRendererType.

Doc from javax.faces.webapp.UIComponentTagBase.getRendererType.

Return the rendererType property that selects the Renderer to be used for encoding this component, or null to ask the component to render itself directly. Subclasses must override this method to return the appropriate value.

Returns:String

the renderer type

Annotations
@Override
releaseback to summary
public void release()

Overrides javax.faces.webapp.UIComponentELTag.release.

Implements javax.servlet.jsp.tagext.Tag.release.

Doc from javax.faces.webapp.UIComponentELTag.release.

Release any resources allocated during the execution of this tag handler.

Annotations
@Override
setForback to summary
public void setFor(ValueExpression forID)
setPropertiesback to summary
protected void setProperties(UIComponent component)

Overrides javax.faces.webapp.UIComponentELTag.setProperties.

Doc from javax.faces.webapp.UIComponentELTag.setProperties.

Override properties and attributes of the specified component, if the corresponding properties of this tag handler instance were explicitly set. This method must be called ONLY if the specified UIComponent was in fact created during the execution of this tag handler instance, and this call will occur BEFORE the UIComponent is added to the view.

Tag subclasses that want to support additional set properties must ensure that the base class setProperties() method is still called. A typical implementation that supports extra properties foo and bar would look something like this:

protected void setProperties(UIComponent component) {
  super.setProperties(component);
  if (foo != null) {
    component.setAttribute("foo", foo);
  }
  if (bar != null) {
    component.setAttribute("bar", bar);
  }
}

The default implementation overrides the following properties:

  • rendered - Set if a value for the rendered property is specified for this tag handler instance.
  • rendererType - Set if the getRendererType() method returns a non-null value.
Parameters
component:UIComponent

UIComponent whose properties are to be overridden

Annotations
@Override