com.sun.webui.jsf.component
Class CommonTask

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by com.sun.webui.jsf.component.WebuiCommand
                  extended by com.sun.webui.jsf.component.CommonTask
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class CommonTask
extends WebuiCommand
implements javax.faces.component.NamingContainer

The CommonTask component is used to greate a single task within a CommonTasksSection or CommonTasksGroup component.


Field Summary
static java.lang.String COMMONTASK_FACET
          Common Task facet identifier
static java.lang.String INFOLINK_FACET
          Info link facet identifier
static java.lang.String INFOPANEL_FACET
          Info panel facet identifier
 
Fields inherited from class javax.faces.component.UICommand
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
CommonTask()
          Creates a new instance of Task
 
Method Summary
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getIcon()
          Specifies a theme key for an image to be displayed in front of the text for the task.
 int getImageHeight()
          Specifies the height in pixels of the image that is specified with the imageUrl attribute
 java.lang.String getImageUrl()
          The path to an image to be displayed in front of the text for the task.
 int getImageWidth()
          Specifies the width in pixels of the image that is specified with the imageUrl attribute.
 javax.faces.component.UIComponent getInfoLink()
          Checks whether a facet has been specified for the Hyperlink
inside the info panel.
 java.lang.String getInfoLinkText()
          Specifies the text for the link that is displayed at the bottom of the task's information panel.
 java.lang.String getInfoLinkUrl()
          Specifies the URL for the link that is displayed at the bottom of the task's information panel.
 javax.faces.component.UIComponent getInfoPanel()
          Checks whether a facet has been specified for the infoPanel.
 java.lang.String getInfoText()
          Specifies the text to be displayed in the information panel for this task.
 java.lang.String getInfoTitle()
          Specifies the title text to be displayed in the information panel for this task.
 java.lang.String getOnBlur()
          Scripting code that is executed when this element loses the focus.
 java.lang.String getOnClick()
          Scripting code that is executed when a mouse click occurs over this component.
 java.lang.String getOnDblClick()
          Scripting code that is executed when a mouse double click occurs over this component.
 java.lang.String getOnFocus()
          Scripting code that is executed when this component receives the focus.
 java.lang.String getOnKeyDown()
          Scripting code that is executed when the user presses down on a key while the component has focus.
 java.lang.String getOnKeyPress()
          Scripting code that is executed when the user presses and releases a key while the component has the focus.
 java.lang.String getOnKeyUp()
          Scripting code that is executed when the user releases a key while the component has focus.
 java.lang.String getOnMouseDown()
          Scripting code that is executed when the user presses a mouse button while the mouse pointer is on the component.
 java.lang.String getOnMouseMove()
          Scripting code that is executed when the user moves the mouse pointer while it is over the component.
 java.lang.String getOnMouseOut()
          Scripting code that is executed when the user moves the mouse pointer off this component.
 java.lang.String getOnMouseOver()
          Scripting code that is executed when the user moves the mouse pointer into the boundary of this component.
 java.lang.String getOnMouseUp()
          Scripting code that is executed when the user releases a mouse button while the mouse pointer is on the component.
 java.lang.String getStyle()
          CSS style(s) that are applied to the outermost HTML element when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) that are 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.
 javax.faces.component.UIComponent getTaskAction()
          Returns a component that represents the action element for the CommonTask.
When the user clicks on this action element, it takes him to the corresponding task.
In the default case, when no facet is specified,
an hyperlink is created, with the default styles
applied to it and is returned back to the invoking function.
 java.lang.Object getText()
          The text to be displayed for the task.
 java.lang.String getTitle()
          The title.
 java.lang.String getToolTip()
          Sets the value of the title attribute for the HTML element.
 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()
          Indicates that activation of this component by the user is not currently permitted.
 boolean isImmediate()
          Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.
 boolean isVisible()
          Indicates 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)
          Indicates that activation of this component by the user is not currently permitted.
 void setIcon(java.lang.String icon)
          Specifies a theme key for an image to be displayed in front of the text for the task.
 void setImageHeight(int imageHeight)
          Specifies the height in pixels of the image that is specified with the imageUrl attribute
 void setImageUrl(java.lang.String imageUrl)
          The path to an image to be displayed in front of the text for the task.
 void setImageWidth(int imageWidth)
          Specifies the width in pixels of the image that is specified with the imageUrl attribute.
 void setImmediate(boolean immediate)
          Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.
 void setInfoLinkText(java.lang.String infoLinkText)
          Specifies the text for the link that is displayed at the bottom of the task's information panel.
 void setInfoLinkUrl(java.lang.String infoLinkUrl)
          Specifies the URL for the link that is displayed at the bottom of the task's information panel.
 void setInfoText(java.lang.String infoText)
          Specifies the text to be displayed in the information panel for this task.
 void setInfoTitle(java.lang.String infoTitle)
          Specifies the title text to be displayed in the information panel for this task.
 void setOnBlur(java.lang.String onBlur)
          Scripting code that is executed when this element loses the focus.
 void setOnClick(java.lang.String onClick)
          Scripting code that is executed when a mouse click occurs over this component.
 void setOnDblClick(java.lang.String onDblClick)
          Scripting code that is executed when a mouse double click occurs over this component.
 void setOnFocus(java.lang.String onFocus)
          Scripting code that is executed when this component receives the focus.
 void setOnKeyDown(java.lang.String onKeyDown)
          Scripting code that is executed when the user presses down on a key while the component has focus.
 void setOnKeyPress(java.lang.String onKeyPress)
          Scripting code that is executed when the user presses and releases a key while the component has the focus.
 void setOnKeyUp(java.lang.String onKeyUp)
          Scripting code that is executed when the user releases a key while the component has focus.
 void setOnMouseDown(java.lang.String onMouseDown)
          Scripting code that is executed when the user presses a mouse button while the mouse pointer is on the component.
 void setOnMouseMove(java.lang.String onMouseMove)
          Scripting code that is executed when the user moves the mouse pointer while it is over the component.
 void setOnMouseOut(java.lang.String onMouseOut)
          Scripting code that is executed when the user moves the mouse pointer off this component.
 void setOnMouseOver(java.lang.String onMouseOver)
          Scripting code that is executed when the user moves the mouse pointer into the boundary of this component.
 void setOnMouseUp(java.lang.String onMouseUp)
          Scripting code that is executed when the user releases a mouse button while the mouse pointer is on the component.
 void setStyle(java.lang.String style)
          CSS style(s) that are applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) that are 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 task.
 void setTitle(java.lang.String title)
          The title.
 void setToolTip(java.lang.String toolTip)
          Sets the value of the title attribute for the HTML element.
 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)
          Indicates whether the component should be viewable by the user in the rendered HTML page.
 
Methods inherited from class com.sun.webui.jsf.component.WebuiCommand
broadcast, getAction, getActionExpression, getActionListener, getActionListenerExpression, processDecodes, processUpdates, processValidators, setActionListenerExpression, setId, setRendered
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, getActionListeners, 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, getRendererType, 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, toString, wait, wait, wait
 

Field Detail

COMMONTASK_FACET

public static final java.lang.String COMMONTASK_FACET
Common Task facet identifier

See Also:
Constant Field Values

INFOPANEL_FACET

public static final java.lang.String INFOPANEL_FACET
Info panel facet identifier

See Also:
Constant Field Values

INFOLINK_FACET

public static final java.lang.String INFOLINK_FACET
Info link facet identifier

See Also:
Constant Field Values
Constructor Detail

CommonTask

public CommonTask()
Creates a new instance of Task

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class javax.faces.component.UICommand

getValue

public java.lang.Object getValue()
Overrides:
getValue in class javax.faces.component.UICommand

getValueExpression

public javax.el.ValueExpression getValueExpression(java.lang.String name)

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

Overrides:
getValueExpression in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding expression to retrieve

setValueExpression

public void setValueExpression(java.lang.String name,
                               javax.el.ValueExpression binding)

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

Overrides:
setValueExpression in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding to set
binding - ValueExpression to set, or null to remove

isDisabled

public boolean isDisabled()
Indicates that activation of this component by the user is not currently permitted.


setDisabled

public void setDisabled(boolean disabled)
Indicates that activation of this component by the user is not currently permitted.


getIcon

public java.lang.String getIcon()

Specifies a theme key for an image to be displayed in front of the text for the task. The key CTS_OVERVIEW will generate an image that can be used to mark tasks that are for overview information about the task


setIcon

public void setIcon(java.lang.String icon)

Specifies a theme key for an image to be displayed in front of the text for the task. The key CTS_OVERVIEW will generate an image that can be used to mark tasks that are for overview information about the task

See Also:
getIcon()

getImageHeight

public int getImageHeight()

Specifies the height in pixels of the image that is specified with the imageUrl attribute


setImageHeight

public void setImageHeight(int imageHeight)

Specifies the height in pixels of the image that is specified with the imageUrl attribute

See Also:
getImageHeight()

getImageUrl

public java.lang.String getImageUrl()

The path to an image to be displayed in front of the text for the task. If both icon and imageUrl are provided, the icon takes precedence over the path specified for the image.


setImageUrl

public void setImageUrl(java.lang.String imageUrl)

The path to an image to be displayed in front of the text for the task. If both icon and imageUrl are provided, the icon takes precedence over the path specified for the image.

See Also:
getImageUrl()

getImageWidth

public int getImageWidth()

Specifies the width in pixels of the image that is specified with the imageUrl attribute.


setImageWidth

public void setImageWidth(int imageWidth)

Specifies the width in pixels of the image that is specified with the imageUrl attribute.

See Also:
getImageWidth()

isImmediate

public boolean isImmediate()
Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.

Specified by:
isImmediate in interface javax.faces.component.ActionSource
Overrides:
isImmediate in class javax.faces.component.UICommand

setImmediate

public void setImmediate(boolean immediate)
Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.

Specified by:
setImmediate in interface javax.faces.component.ActionSource
Overrides:
setImmediate in class WebuiCommand

getInfoLinkText

public java.lang.String getInfoLinkText()

Specifies the text for the link that is displayed at the bottom of the task's information panel.


setInfoLinkText

public void setInfoLinkText(java.lang.String infoLinkText)

Specifies the text for the link that is displayed at the bottom of the task's information panel.

See Also:
getInfoLinkText()

getInfoLinkUrl

public java.lang.String getInfoLinkUrl()

Specifies the URL for the link that is displayed at the bottom of the task's information panel.


setInfoLinkUrl

public void setInfoLinkUrl(java.lang.String infoLinkUrl)

Specifies the URL for the link that is displayed at the bottom of the task's information panel.

See Also:
getInfoLinkUrl()

getInfoText

public java.lang.String getInfoText()

Specifies the text to be displayed in the information panel for this task.


setInfoText

public void setInfoText(java.lang.String infoText)

Specifies the text to be displayed in the information panel for this task.

See Also:
getInfoText()

getInfoTitle

public java.lang.String getInfoTitle()

Specifies the title text to be displayed in the information panel for this task.


setInfoTitle

public void setInfoTitle(java.lang.String infoTitle)

Specifies the title text to be displayed in the information panel for this task.

See Also:
getInfoTitle()

getOnBlur

public java.lang.String getOnBlur()

Scripting code that is executed when this element loses the focus.


setOnBlur

public void setOnBlur(java.lang.String onBlur)

Scripting code that is executed when this element loses the focus.

See Also:
getOnBlur()

getOnClick

public java.lang.String getOnClick()

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


setOnClick

public void setOnClick(java.lang.String onClick)

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

See Also:
getOnClick()

getOnDblClick

public java.lang.String getOnDblClick()

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


setOnDblClick

public void setOnDblClick(java.lang.String onDblClick)

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

See Also:
getOnDblClick()

getOnFocus

public java.lang.String getOnFocus()

Scripting code that is executed when this component receives the focus. An element receivesthe 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 that is executed when this component receives the focus. An element receivesthe 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 that is executed when the user presses down on a key while the component has focus.


setOnKeyDown

public void setOnKeyDown(java.lang.String onKeyDown)

Scripting code that is 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 that is executed when the user presses and releases a key while the component has the focus.


setOnKeyPress

public void setOnKeyPress(java.lang.String onKeyPress)

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

See Also:
getOnKeyPress()

getOnKeyUp

public java.lang.String getOnKeyUp()

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


setOnKeyUp

public void setOnKeyUp(java.lang.String onKeyUp)

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

See Also:
getOnKeyUp()

getOnMouseDown

public java.lang.String getOnMouseDown()

Scripting code that is 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 that is 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 that is executed when the user moves the mouse pointer while it is over the component.


setOnMouseMove

public void setOnMouseMove(java.lang.String onMouseMove)

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

See Also:
getOnMouseMove()

getOnMouseOut

public java.lang.String getOnMouseOut()

Scripting code that is executed when the user moves the mouse pointer off this component.


setOnMouseOut

public void setOnMouseOut(java.lang.String onMouseOut)

Scripting code that is executed when the user moves the mouse pointer off this component.

See Also:
getOnMouseOut()

getOnMouseOver

public java.lang.String getOnMouseOver()

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


setOnMouseOver

public void setOnMouseOver(java.lang.String onMouseOver)

Scripting code that is 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 that is 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 that is executed when the user releases a mouse button while the mouse pointer is on the component.

See Also:
getOnMouseUp()

getStyle

public java.lang.String getStyle()

CSS style(s) that are applied to the outermost HTML element when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) that are applied to the outermost HTML element when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) that are to be applied to the outermost HTML element when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) that are to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyleClass()

getTabIndex

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.


setTabIndex

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.

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 to be displayed for the task.


setText

public void setText(java.lang.Object text)

The text to be displayed for the task.

See Also:
getText()

getTitle

public java.lang.String getTitle()
The title.


setTitle

public void setTitle(java.lang.String title)
The title.


getToolTip

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.


setToolTip

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.

See Also:
getToolTip()

isVisible

public boolean isVisible()

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

Indicates 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.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class WebuiCommand

saveState

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

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class WebuiCommand

getTaskAction

public javax.faces.component.UIComponent getTaskAction()
Returns a component that represents the action element for the CommonTask.
When the user clicks on this action element, it takes him to the corresponding task.
In the default case, when no facet is specified,
an hyperlink is created, with the default styles
applied to it and is returned back to the invoking function.

Returns:
- The commonTask action component.

getInfoLink

public javax.faces.component.UIComponent getInfoLink()
Checks whether a facet has been specified for the Hyperlink
inside the info panel. If not, it checks whether the infoLinkUrl
and infoLinkText attributes have been specified. If these attributes of
the component have been specified, it creates an hyperlink with these
attributes. Otherwise, it returns null

Returns:
- The hyperlink present at the bottom of the info panel.

getInfoPanel

public javax.faces.component.UIComponent getInfoPanel()
Checks whether a facet has been specified for the infoPanel. TODO: Is it possible to create the default info panel here instead of doing it in the renderer. There is a lot of html to be generated between the components present in the panel which is making the creation of this facet over here impossible.

Returns:
- A component which represents the info panel for the common task.


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.