|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UICommand
com.sun.webui.jsf.component.WebuiCommand
com.sun.webui.jsf.component.Hyperlink
public class Hyperlink
Use the webuijsf:hyperlink
tag to display a HTML hyperlink to a URL, or a
link that submits a form.
If UIParameter components are specified as children to the hyperlink component and an url attribute exists, then the behavior of the url here is similar to the one observed with the anchor component. The name, value pairs of the UIParameter components are added as request parameters to the url attribute. If no url is specified for the hyperlink, then this will be passed on to the hyperlink widget as a JSON array where these name/value pairs will be appended as request parameters when the hyperlink is clicked and the form is submitted.
If the disabled attribute of the hyperlink is set to true, clicking the hyperlink on the browser will not generate a request and hence the form will not be submitted or the page will not navigate to the specified url depending on whether the url has been specified or not.
If you intend to use the hyperlink for navigating to a different page by using the url attribute,
consider using the webuijsf:anchor
component instead of the hyperlink component.
Field Summary |
---|
Fields inherited from class javax.faces.component.UICommand |
---|
COMPONENT_FAMILY, COMPONENT_TYPE |
Constructor Summary | |
---|---|
Hyperlink()
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
getFamily()
Return the family for this component. |
java.lang.String |
getFocusElementId(javax.faces.context.FacesContext context)
Returns the id of an HTML element suitable to receive the focus. |
java.lang.String |
getHtmlTemplate()
Get alternative HTML template to be used by this component. |
javax.faces.component.UIComponent |
getIndicatorComponent(javax.faces.context.FacesContext context,
Label label)
Return a component instance that can be referenced by a Label in order to evaluate the required
and valid states of this component. |
java.lang.String |
getLabeledElementId(javax.faces.context.FacesContext context)
Returns the absolute ID of an HTML element suitable for use as the value of an HTML LABEL element's for attribute. |
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 |
getPrimaryElementID(javax.faces.context.FacesContext context)
Deprecated. |
java.lang.String |
getRendererType()
Return the renderer type for this 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 to the outermost HTML element when this component is rendered. |
java.lang.String |
getStyleClass()
CSS style class(es) to be applied to the outermost HTML element when this component is rendered. |
int |
getTabIndex()
Position of this element in the tabbing order of the current document. |
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 to be displayed for the hyperlink. |
java.lang.String |
getToolTip()
Sets the value of the title attribute for the HTML element. |
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. |
java.lang.Object |
getValue()
|
javax.el.ValueExpression |
getValueExpression(java.lang.String name)
Return the ValueExpression stored for the
specified name (if any), respecting any property aliases. |
boolean |
isDisabled()
Flag indicating that activation of this component by the user is not currently permitted. |
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 |
setDisabled(boolean disabled)
Flag indicating that activation of this component by the user is not currently permitted. |
void |
setHtmlTemplate(java.lang.String htmlTemplate)
Set alternative HTML template to be used by this component. |
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 to the outermost HTML element when this component is rendered. |
void |
setStyleClass(java.lang.String styleClass)
CSS style class(es) to be applied to the outermost HTML element when this component is rendered. |
void |
setTabIndex(int tabIndex)
Position of this element in the tabbing order of the current document. |
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 to be displayed for the hyperlink. |
void |
setToolTip(java.lang.String toolTip)
Sets the value of the title attribute for the HTML element. |
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 |
setValueExpression(java.lang.String name,
javax.el.ValueExpression binding)
Set the ValueExpression 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. |
java.lang.String |
toString()
|
Methods inherited from class com.sun.webui.jsf.component.WebuiCommand |
---|
broadcast, getAction, getActionExpression, getActionListener, getActionListenerExpression, processDecodes, processUpdates, processValidators, setActionListenerExpression, setId, setImmediate, setRendered |
Methods inherited from class javax.faces.component.UICommand |
---|
addActionListener, getActionListeners, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setValue |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getContainerClientId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Hyperlink()
Method Detail |
---|
public java.lang.String getFamily()
Return the family for this component.
getFamily
in class javax.faces.component.UICommand
public java.lang.String getRendererType()
Return the renderer type for this component.
getRendererType
in class javax.faces.component.UIComponentBase
public java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
getPrimaryElementID
in interface com.sun.webui.jsf.component.ComplexComponent
context
- The FacesContext for the request
getLabeledElementId(javax.faces.context.FacesContext)
,
getFocusElementId(javax.faces.context.FacesContext)
public java.lang.String getLabeledElementId(javax.faces.context.FacesContext context)
for
attribute.
If the ComplexComponent
has sub-compoents, and one of
the sub-components is the target of a label, if that sub-component
is a ComplexComponent
, then
getLabeledElementId
must called on the sub-component and
the value returned. The value returned by this
method call may or may not resolve to a component instance.
getLabeledElementId
in interface com.sun.webui.jsf.component.ComplexComponent
context
- The FacesContext used for the request
for
attribute.public java.lang.String getFocusElementId(javax.faces.context.FacesContext context)
ComplexComponent
has sub-compoents, and one of
the sub-components is to reveive the focus, if that sub-component
is a ComplexComponent
, then
getFocusElementId
must called on the sub-component and
the value returned. The value returned by this
method call may or may not resolve to a component instance.
This implementations returns the value of
getLabeledElementId
.
getFocusElementId
in interface com.sun.webui.jsf.component.ComplexComponent
context
- The FacesContext used for the requestpublic javax.faces.component.UIComponent getIndicatorComponent(javax.faces.context.FacesContext context, Label label)
Label
in order to evaluate the required
and valid
states of this component.
This implementation returns null
.
Hyperlink
does not support the required or valid states
getIndicatorComponent
in interface com.sun.webui.jsf.component.ComplexComponent
context
- The current FacesContext
instancelabel
- The Label
that labels this component.
UIComponent
in order to evaluate the
required and valid states.public java.lang.String toString()
toString
in class java.lang.Object
public javax.el.ValueExpression getValueExpression(java.lang.String name)
Return the ValueExpression
stored for the
specified name (if any), respecting any property aliases.
getValueExpression
in class javax.faces.component.UIComponentBase
name
- Name of value binding expression to retrievepublic void setValueExpression(java.lang.String name, javax.el.ValueExpression binding)
Set the ValueExpression
stored for the
specified name (if any), respecting any property
aliases.
setValueExpression
in class javax.faces.component.UIComponentBase
name
- Name of value binding to setbinding
- ValueExpression to set, or null to removepublic java.lang.Object getValue()
getValue
in class javax.faces.component.UICommand
public boolean isDisabled()
Flag indicating that activation of this component by the user is not currently permitted.
public void setDisabled(boolean disabled)
Flag indicating that activation of this component by the user is not currently permitted.
isDisabled()
public java.lang.String getOnBlur()
Scripting code executed when this element loses focus.
public void setOnBlur(java.lang.String onBlur)
Scripting code executed when this element loses focus.
getOnBlur()
public java.lang.String getOnClick()
Scripting code executed when a mouse click occurs over this component. If the component submits the form (by using the action attribute), the script that you use with the onClick attribute should not return from the function. When the action attribute is used, the component handles the return with a script that is appended to the anchor element's onclick property. When you supply an onClick attribute, this return script is appended after your script in the anchor's onclick. It is ok to return from your script to abort the submit process if necessary.
public void setOnClick(java.lang.String onClick)
Scripting code executed when a mouse click occurs over this component. If the component submits the form (by using the action attribute), the script that you use with the onClick attribute should not return from the function. When the action attribute is used, the component handles the return with a script that is appended to the anchor element's onclick property. When you supply an onClick attribute, this return script is appended after your script in the anchor's onclick. It is ok to return from your script to abort the submit process if necessary.
getOnClick()
public java.lang.String getOnDblClick()
Scripting code executed when a mouse double click occurs over this component.
public void setOnDblClick(java.lang.String onDblClick)
Scripting code executed when a mouse double click occurs over this component.
getOnDblClick()
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.
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.
getOnFocus()
public java.lang.String getOnKeyDown()
Scripting code executed when the user presses down on a key while the component has focus.
public void setOnKeyDown(java.lang.String onKeyDown)
Scripting code executed when the user presses down on a key while the component has focus.
getOnKeyDown()
public java.lang.String getOnKeyPress()
Scripting code executed when the user presses and releases a key while the component has focus.
public void setOnKeyPress(java.lang.String onKeyPress)
Scripting code executed when the user presses and releases a key while the component has focus.
getOnKeyPress()
public java.lang.String getOnKeyUp()
Scripting code executed when the user releases a key while the component has focus.
public void setOnKeyUp(java.lang.String onKeyUp)
Scripting code executed when the user releases a key while the component has focus.
getOnKeyUp()
public java.lang.String getOnMouseDown()
Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
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.
getOnMouseDown()
public java.lang.String getOnMouseMove()
Scripting code executed when the user moves the mouse pointer while over the component.
public void setOnMouseMove(java.lang.String onMouseMove)
Scripting code executed when the user moves the mouse pointer while over the component.
getOnMouseMove()
public java.lang.String getOnMouseOut()
Scripting code executed when a mouse out movement occurs over this component.
public void setOnMouseOut(java.lang.String onMouseOut)
Scripting code executed when a mouse out movement occurs over this component.
getOnMouseOut()
public java.lang.String getOnMouseOver()
Scripting code executed when the user moves the mouse pointer into the boundary of this component.
public void setOnMouseOver(java.lang.String onMouseOver)
Scripting code executed when the user moves the mouse pointer into the boundary of this component.
getOnMouseOver()
public java.lang.String getOnMouseUp()
Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
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.
getOnMouseUp()
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).
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).
getShape()
public java.lang.String getStyle()
CSS style(s) to be applied to the outermost HTML element when this component is rendered.
public void setStyle(java.lang.String style)
CSS style(s) to be applied to the outermost HTML element when this component is rendered.
getStyle()
public java.lang.String getStyleClass()
CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
public void setStyleClass(java.lang.String styleClass)
CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
getStyleClass()
public int getTabIndex()
Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.
public void setTabIndex(int tabIndex)
Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.
getTabIndex()
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
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
getTarget()
public java.lang.Object getText()
The text to be displayed for the hyperlink.
public void setText(java.lang.Object text)
The text to be displayed for the hyperlink.
getText()
public java.lang.String getToolTip()
Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the HTML element.
public void setToolTip(java.lang.String toolTip)
Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the HTML element.
getToolTip()
public java.lang.String getType()
The MIME content type of the resource specified by this component.
public void setType(java.lang.String type)
The MIME content type of the resource specified by this component.
getType()
public java.lang.String getUrl()
Absolute, relative, or context relative (starting with "/") URL to the resource selected by this hyperlink. If the url attribute is specified, clicking this hyperlink sends the browser to the new location. If the action attribute is specified, the form is submitted. If both are specified, the url attribute takes precedence.
public void setUrl(java.lang.String url)
Absolute, relative, or context relative (starting with "/") URL to the resource selected by this hyperlink. If the url attribute is specified, clicking this hyperlink sends the browser to the new location. If the action attribute is specified, the form is submitted. If both are specified, the url attribute takes precedence.
getUrl()
public java.lang.String getUrlLang()
The language code of the resource designated by this hyperlink.
public void setUrlLang(java.lang.String urlLang)
The language code of the resource designated by this hyperlink.
getUrlLang()
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.
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.
isVisible()
public java.lang.String getHtmlTemplate()
public void setHtmlTemplate(java.lang.String htmlTemplate)
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
Restore the state of this component.
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class WebuiCommand
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
saveState
in interface javax.faces.component.StateHolder
saveState
in class WebuiCommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |