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

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended byjavax.faces.component.UICommand
              extended bycom.sun.rave.web.ui.component.HyperlinkBase
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder
Direct Known Subclasses:
Hyperlink

public abstract class HyperlinkBase
extends javax.faces.component.UICommand

Use the ui:hyperlink tag to display a HTML hyperlink to a URL, or a link that submits a form. If the action attribute is used, the form is submitted. If the url attribute is used, the link is a normal hyperlink that sends the browser to a new location.

The ui:imageHyperlink component can be also be used to submit forms. If the action attribute is used, the form is submitted. If the url attribute is used, the link is a normal hyperlink that sends the browser to a new location.


HTML Elements and Layout

The rendered HTML page displays an XHTML element. If the link submits the form the onclick will have some additional behavior that the user should be aware of. See the onclick attribute below.

Client Side Javascript Functions

None.

Examples

Example 1: Create a hyperlink that submits the form:

<ui:hyperlink id="hyperlinktest1" text="#{HyperlinkBean.text}" action="#{HyperlinkBean.success}" />

Note: id can be used as a unique identifier if the hyperlink is programatically addressed

Example 2: Create a hyperlink that goes to another page:

<ui:hyperlink id="hyperlinktest2" text="#{HyperlinkBean.text}" url="http://www.google.com" />

Note: url property being set signifies that this *will not* submit to the server and will be a straight hyperlink

Example 3: Using the body of a hyperlink to render text:

<ui:hyperlink id="hyperlinktest3" url="http://www.sun.com" > <ui:image url="myyahoo.gif" /><ui:staticText text="more text" /> </ui:hyperlink>

Example 4: Using f:params to add additional request parameters when the hyperlink action is invoked:

<ui:hyperlink  id="hyperlinktest1"  text="#{HyperlinkBean.label}" action="#{HyperlinkBean.success}" >
    <f:param name="testingParam1" value="success!"/>
    <f:param name="testingParam2" value="failure!"/>
</ui:hyperlink>

Note:  After clicking on this hyperlink, the page will be submitted and the request parameter map will have 2 additional items in it: testingParam1 and testingParam2 with their associtated values

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


Field Summary
 
Fields inherited from class javax.faces.component.UICommand
COMPONENT_FAMILY, COMPONENT_TYPE
 
Constructor Summary
HyperlinkBase()
          Construct a new HyperlinkBase.
 
Method Summary
 javax.faces.el.MethodBinding getAction()
          Method binding representing a method that processes application actions from this component.
 javax.faces.el.MethodBinding getActionListener()
          Method binding representing a method that receives action from this, and possibly other, components.
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getOnBlur()
          Scripting code executed when this element loses focus.
 java.lang.String getOnClick()
          Scripting code executed when a mouse click occurs over this component.
 java.lang.String getOnDblClick()
          Scripting code executed when a mouse double click occurs over this component.
 java.lang.String getOnFocus()
          Scripting code executed when this component receives focus.
 java.lang.String getOnKeyDown()
          Scripting code executed when the user presses down on a key while the component has focus.
 java.lang.String getOnKeyPress()
          Scripting code executed when the user presses and releases a key while the component has focus.
 java.lang.String getOnKeyUp()
          Scripting code executed when the user releases a key while the component has focus.
 java.lang.String getOnMouseDown()
          Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
 java.lang.String getOnMouseMove()
          Scripting code executed when the user moves the mouse pointer while over the component.
 java.lang.String getOnMouseOut()
          Scripting code executed when a mouse out movement occurs over this component.
 java.lang.String getOnMouseOver()
          Scripting code executed when the user moves the mouse pointer into the boundary of this component.
 java.lang.String getOnMouseUp()
          Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
 java.lang.String getShape()
          The shape of the hot spot on the screen (for use in client-side image maps).
 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.
 int getTabIndex()
          The position of this component in the tabbing order sequence
 java.lang.String getTarget()
          The resource at the specified URL is displayed in the frame that is specified with the target attribute.
 java.lang.Object getText()
          The text description of the hyperlink
 java.lang.String getToolTip()
          Display the text as a tooltip for this component
 java.lang.String getType()
          The MIME content type of the resource specified by this component.
 java.lang.String getUrl()
          Absolute, relative, or context relative (starting with "/") URL to the resource selected by this hyperlink.
 java.lang.String getUrlLang()
          The language code of the resource designated by this hyperlink.
 javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
          Return the ValueBinding stored for the specified name (if any), respecting any property aliases.
 boolean isDisabled()
          Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 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 setAction(javax.faces.el.MethodBinding action)
          Method binding representing a method that processes application actions from this component.
 void setActionListener(javax.faces.el.MethodBinding actionListener)
          Method binding representing a method that receives action from this, and possibly other, components.
 void setDisabled(boolean disabled)
          Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.
 void setOnBlur(java.lang.String onBlur)
          Scripting code executed when this element loses focus.
 void setOnClick(java.lang.String onClick)
          Scripting code executed when a mouse click occurs over this component.
 void setOnDblClick(java.lang.String onDblClick)
          Scripting code executed when a mouse double click occurs over this component.
 void setOnFocus(java.lang.String onFocus)
          Scripting code executed when this component receives focus.
 void setOnKeyDown(java.lang.String onKeyDown)
          Scripting code executed when the user presses down on a key while the component has focus.
 void setOnKeyPress(java.lang.String onKeyPress)
          Scripting code executed when the user presses and releases a key while the component has focus.
 void setOnKeyUp(java.lang.String onKeyUp)
          Scripting code executed when the user releases a key while the component has focus.
 void setOnMouseDown(java.lang.String onMouseDown)
          Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
 void setOnMouseMove(java.lang.String onMouseMove)
          Scripting code executed when the user moves the mouse pointer while over the component.
 void setOnMouseOut(java.lang.String onMouseOut)
          Scripting code executed when a mouse out movement occurs over this component.
 void setOnMouseOver(java.lang.String onMouseOver)
          Scripting code executed when the user moves the mouse pointer into the boundary of this component.
 void setOnMouseUp(java.lang.String onMouseUp)
          Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
 void setShape(java.lang.String shape)
          The shape of the hot spot on the screen (for use in client-side image maps).
 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.
 void setTabIndex(int tabIndex)
          The position of this component in the tabbing order sequence
 void setTarget(java.lang.String target)
          The resource at the specified URL is displayed in the frame that is specified with the target attribute.
 void setText(java.lang.Object text)
          The text description of the hyperlink
 void setToolTip(java.lang.String toolTip)
          Display the text as a tooltip for this component
 void setType(java.lang.String type)
          The MIME content type of the resource specified by this component.
 void setUrl(java.lang.String url)
          Absolute, relative, or context relative (starting with "/") URL to the resource selected by this hyperlink.
 void setUrlLang(java.lang.String urlLang)
          The language code of the resource designated by this hyperlink.
 void setValueBinding(java.lang.String name, javax.faces.el.ValueBinding binding)
          Set the ValueBinding stored for the specified name (if any), respecting any property aliases.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, broadcast, getActionListeners, getValue, isImmediate, queueEvent, removeActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HyperlinkBase

public HyperlinkBase()

Construct a new HyperlinkBase.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.


getValueBinding

public javax.faces.el.ValueBinding getValueBinding(java.lang.String name)

Return the ValueBinding stored for the specified name (if any), respecting any property aliases.

Parameters:
name - Name of value binding to retrieve

setValueBinding

public void setValueBinding(java.lang.String name,
                            javax.faces.el.ValueBinding binding)

Set the ValueBinding stored for the specified name (if any), respecting any property aliases.

Parameters:
name - Name of value binding to set
binding - ValueBinding to set, or null to remove

getAction

public javax.faces.el.MethodBinding getAction()

Method binding representing a method that processes application actions from this component.


setAction

public void setAction(javax.faces.el.MethodBinding action)

Method binding representing a method that processes application actions from this component.

See Also:
getAction()

getActionListener

public javax.faces.el.MethodBinding getActionListener()

Method binding representing a method that receives action from this, and possibly other, components.


setActionListener

public void setActionListener(javax.faces.el.MethodBinding actionListener)

Method binding representing a method that receives action from this, and possibly other, components.

See Also:
getActionListener()

isDisabled

public boolean isDisabled()

Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.


setDisabled

public void setDisabled(boolean disabled)

Flag indicating that the user is not permitted to activate this component, and that the component's value will not be submitted with the form.

See Also:
isDisabled()

getOnBlur

public java.lang.String getOnBlur()

Scripting code executed when this element loses focus.


setOnBlur

public void setOnBlur(java.lang.String onBlur)

Scripting code executed when this element loses focus.

See Also:
getOnBlur()

getOnClick

public java.lang.String getOnClick()

Scripting code executed when a mouse click occurs over this component. If the component submits the form, the script should not return from this function. The return will be handled by the script that is appended to the onclick. It is ok to return from this script to abort the submit process if necessary.


setOnClick

public void setOnClick(java.lang.String onClick)

Scripting code executed when a mouse click occurs over this component. If the component submits the form, the script should not return from this function. The return will be handled by the script that is appended to the onclick. It is ok to return from this script to abort the submit process if necessary.

See Also:
getOnClick()

getOnDblClick

public java.lang.String getOnDblClick()

Scripting code executed when a mouse double click occurs over this component.


setOnDblClick

public void setOnDblClick(java.lang.String onDblClick)

Scripting code executed when a mouse double click occurs over this component.

See Also:
getOnDblClick()

getOnFocus

public java.lang.String getOnFocus()

Scripting code executed when this component receives focus. An element receives focus when the user selects the element by pressing the tab key or clicking the mouse.


setOnFocus

public void setOnFocus(java.lang.String onFocus)

Scripting code executed when this component receives focus. An element receives focus when the user selects the element by pressing the tab key or clicking the mouse.

See Also:
getOnFocus()

getOnKeyDown

public java.lang.String getOnKeyDown()

Scripting code executed when the user presses down on a key while the component has focus.


setOnKeyDown

public void setOnKeyDown(java.lang.String onKeyDown)

Scripting code executed when the user presses down on a key while the component has focus.

See Also:
getOnKeyDown()

getOnKeyPress

public java.lang.String getOnKeyPress()

Scripting code executed when the user presses and releases a key while the component has focus.


setOnKeyPress

public void setOnKeyPress(java.lang.String onKeyPress)

Scripting code executed when the user presses and releases a key while the component has focus.

See Also:
getOnKeyPress()

getOnKeyUp

public java.lang.String getOnKeyUp()

Scripting code executed when the user releases a key while the component has focus.


setOnKeyUp

public void setOnKeyUp(java.lang.String onKeyUp)

Scripting code executed when the user releases a key while the component has focus.

See Also:
getOnKeyUp()

getOnMouseDown

public java.lang.String getOnMouseDown()

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.


setOnMouseDown

public void setOnMouseDown(java.lang.String onMouseDown)

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.

See Also:
getOnMouseDown()

getOnMouseMove

public java.lang.String getOnMouseMove()

Scripting code executed when the user moves the mouse pointer while over the component.


setOnMouseMove

public void setOnMouseMove(java.lang.String onMouseMove)

Scripting code executed when the user moves the mouse pointer while over the component.

See Also:
getOnMouseMove()

getOnMouseOut

public java.lang.String getOnMouseOut()

Scripting code executed when a mouse out movement occurs over this component.


setOnMouseOut

public void setOnMouseOut(java.lang.String onMouseOut)

Scripting code executed when a mouse out movement occurs over this component.

See Also:
getOnMouseOut()

getOnMouseOver

public java.lang.String getOnMouseOver()

Scripting code executed when the user moves the mouse pointer into the boundary of this component.


setOnMouseOver

public void setOnMouseOver(java.lang.String onMouseOver)

Scripting code executed when the user moves the mouse pointer into the boundary of this component.

See Also:
getOnMouseOver()

getOnMouseUp

public java.lang.String getOnMouseUp()

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.


setOnMouseUp

public void setOnMouseUp(java.lang.String onMouseUp)

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.

See Also:
getOnMouseUp()

getShape

public java.lang.String getShape()

The shape of the hot spot on the screen (for use in client-side image maps). Valid values are: default (entire region); rect (rectangular region); circle (circular region); and poly (polygonal region).


setShape

public void setShape(java.lang.String shape)

The shape of the hot spot on the screen (for use in client-side image maps). Valid values are: default (entire region); rect (rectangular region); circle (circular region); and poly (polygonal region).

See Also:
getShape()

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()

getTabIndex

public int getTabIndex()

The position of this component in the tabbing order sequence


setTabIndex

public void setTabIndex(int tabIndex)

The position of this component in the tabbing order sequence

See Also:
getTabIndex()

getTarget

public java.lang.String getTarget()

The resource at the specified URL is displayed in the frame that is specified with the target attribute. Values such as "_blank" that are valid for the target attribute of a HTML anchor element are also valid for this attribute in this component


setTarget

public void setTarget(java.lang.String target)

The resource at the specified URL is displayed in the frame that is specified with the target attribute. Values such as "_blank" that are valid for the target attribute of a HTML anchor element are also valid for this attribute in this component

See Also:
getTarget()

getText

public java.lang.Object getText()

The text description of the hyperlink


setText

public void setText(java.lang.Object text)

The text description of the hyperlink

See Also:
getText()

getToolTip

public java.lang.String getToolTip()

Display the text as a tooltip for this component


setToolTip

public void setToolTip(java.lang.String toolTip)

Display the text as a tooltip for this component

See Also:
getToolTip()

getType

public java.lang.String getType()

The MIME content type of the resource specified by this component.


setType

public void setType(java.lang.String type)

The MIME content type of the resource specified by this component.

See Also:
getType()

getUrl

public java.lang.String getUrl()

Absolute, relative, or context relative (starting with "/") URL to the resource selected by this hyperlink. If not specified, clicking this hyperlink will submit the surrounding form.


setUrl

public void setUrl(java.lang.String url)

Absolute, relative, or context relative (starting with "/") URL to the resource selected by this hyperlink. If not specified, clicking this hyperlink will submit the surrounding form.

See Also:
getUrl()

getUrlLang

public java.lang.String getUrlLang()

The language code of the resource designated by this hyperlink.


setUrlLang

public void setUrlLang(java.lang.String urlLang)

The language code of the resource designated by this hyperlink.

See Also:
getUrlLang()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.


setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

See Also:
isVisible()

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.