com.sun.rave.web.ui.component
Class AnchorBase

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended bycom.sun.rave.web.ui.component.AnchorBase
All Implemented Interfaces:
javax.faces.component.StateHolder
Direct Known Subclasses:
Anchor

public abstract class AnchorBase
extends javax.faces.component.UIComponentBase

Use the ui:anchor tag to create HTML anchors in the rendered HTML page. You can then use ui:hyperlink tags that jump to the locations of the anchors in the page.

HTML Elements and Layout

The ui:anchor tag creates an <a> element in the rendered HTML page. The name and id attributes of the <a> element are both set to the value of the id attribute specified with the ui:anchor tag. The name attibute is included to maintain compatibility with older browsers.

Client Side Javascript Functions

None. 

Examples

Example 1: Create an anchor

<ui:anchor id="anchor1" />

This generates an anchor, with id and name set to the same value.
  
<a id="anchor1" name="anchor1" />

Example 2: Create a hyperlink to that will go to the anchor above

<ui:hyperlink id="gotoAnchor1" url="#anchor1" />

Example 3: Create a context  relative hyperlink to go to the anchor in Example 1

<ui:hyperlink id="gotoAnchor1" url="/faces/hyperlink.jsp#anchor1" />

Note:  In the url attribute, you must specify a path that maps to the correct servlet. However, you do not need the context. In this example, the
/faces part of the path maps to the servlet through the JSF FacesServlet as defined in the web.xml.

Auto-generated component class. Do NOT modify; all changes will be lost!


Constructor Summary
AnchorBase()
          Construct a new AnchorBase.
 
Method Summary
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getStyle()
          CSS style(s) to be applied when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied when this component is rendered.
 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 setStyle(java.lang.String style)
          CSS style(s) to be applied when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied when this component is rendered.
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnchorBase

public AnchorBase()

Construct a new AnchorBase.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.


getStyle

public java.lang.String getStyle()

CSS style(s) to be applied when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied when this component is rendered.

See Also:
getStyleClass()

restoreState

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

Restore the state of this component.


saveState

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

Save the state of this component.