webuijsf
Tag commonTask


Use the webuijsf:commonTask tag to create a single task within a common tasks section or common tasks group.

Tasks can be used in the followin ways:

The tasks can be grouped into categories of related tasks.

The common tasks section is created with the following tags:

The webuijsf:commonTasksGroup is not required as a container for webuijsf:commonTask tags. Tasks can be ungrouped by placing the webuijsf:commonTask tags directly in the webuijsf:commonTasksSection tag.

See the documentation for the webuijsf:commonTasksSection and webuijsf:commonTasksGroup tags for more information about those tags.

HTML Elements and Layout

The commonTask component renders XHTML <span> and <a> elements within table rows rendered by the commonTasksSection component. Each task is a link that can be used to redirect users to a page where they can perform a particular task.

The following diagram shows the relative locations of the common task section's areas for which you can define content, and the attributes or facets that can be used for each area. The diagram shows the default two-column layout. A single column or multiple column layout would contain similar content areas.

The areas that are specified with webuijsf:commonTask tags are highlighted in blue. The grayed out areas are controlled with webuijsf:commonTasksSection and webuijsf:commonTasksGroup tags, but are shown here for context.

Common Tasks Section Title (title attribute)
Help text (helpText attribute or help facet)
Common Task Group 1 Title (title attribute)
Common Task Group 2 Title (title attribute)
Image
(icon or
imageUrl attribute)

Common Task 1 Text
(text attribute or
taskAction facet)

Info button
(infoText or infoTitle attribute
or infoPanel facet)

Image
(icon or
imageUrl attribute)
Common Task 2 Text
(text attribute or
taskAction facet)
Info button
(infoText or infoTitle attribute
or infoPanel facet)
Areas below are displayed when the info button is clicked.
Information panel title (infoTitle attribute)

Information text (infoText attribute
or infoPanel facet)
Link to another page (infoLinkText and infoLinkUrl attributes, or infoLink facet)

Image
(icon or
imageUrl attribute
Common Task 1 Text
(text attribute or
taskAction facet)

Info button
(infoText or infoTitle attribute
or infoPanel facet)

Image
(icon or
imageUrl attribute)
Common Task 2 Text
(text attribute or
taskAction facet)

Info button
(infoText or infoTitle attribute
or infoPanel facet)

Image
(icon or
imageUrl attribute)
Common Task 3 Text
(text attribute or
taskAction facet)

Info button
(infoText or infoTitle attribute
or infoPanel facet)



Configuring the webuijsf:commonTask tag

For the basic configuration of the webuijsf:commonTask tag, you can provide the task text with the text attribute, and specify the page that must be navigated to by using the actionExpression attribute or by using one of the client side JavaScript attributes such as onClick. A link that displays the specified text value is created to invoke the action.

You can configure the webuijsf:commonTask tag so that the task includes an information icon after the task text. When the user clicks the icon, an information panel opens below the task. To cause the information icon to be rendered, you should set one or both of the infoText and infoTitle attributes. Use infoText to specify the text to display in the information panel, and infoTitle to supply a title for the information panel. You can include a link within the information panel by specifying the infoLinkText and infoLinkUrl attributes. The link is displayed at the bottom of the information panel.

You can also use facets to create the task and the information panel with other components. See the Facets section for more information.

You can display a graphic image in front of the task by using the icon attribute to specify a theme image key. The key COMMON_TASK_OVERVIEW will generate an image that can be used to mark tasks that are for overview information about the task. You can also use the imageUrl attribute to specify the URL path to an image.

Facets

The webuijsf:commonTask tag supports the following facets:

taskAction
Used to define a custom component to be displayed for the task. The component that you specify in this facet should invoke an action for the task. See Examples to learn how to use this facet.
infoLink
Used to define a custom component to be displayed in the information panel, to replace the link that is created with the infoLinkText and infoLinkUrl attributes.
infoPanel
Used to create the content of the information panel, to replace the content that is created with the infoText and infoTitle attributes. When you use this facet, the info button is rendered just as it is for the infoText and infoTitle attributes. You cannot specify your own info button. Note that you must handle the formatting of the output that appears in the infomation panel. For example, you might use webuijsf:panelGroup and CSS syles, to control spacing. See Examples to see how to use the facet.

Code Examples

Example 1: Creating tasks with tag attributes

<webuijsf:commonTasksSection id="tasks1" title = "#{tasks.tskTtl}">
   <webuijsf:commonTaskGroup id="Taskgroup1" title="#{tasks.grpTtl}" >
     <webuijsf:commonTask id="task1" text="#{tasks.tskTxt1}" actionExpression="task1" />
     <webuijsf:commonTask id="task2" text="#{tasks.tskTxt2}" actionExpression="task2"/>
     <webuijsf:commonTask id="task3" text="#(tasks.tskTxt3)" onClick="popup();return false;"/>
    </webuijsf:commonTaskGroup>
</webuijsf:commonTasksSection>


Example 2: Creating a task with the taskAction facet

<webuijsf:commonTasksSection id="tasks1" title = "#{tasks.tskTtl}">
  <webuijsf:commonTaskGroup id="Taskgroup1" title="#{tasks.grpTtl}" >
     <webuijsf:commonTask id="task1" >
       <f:facet name="taskAction" >
         <webuijsf:hyperlink id="taskLink" text="#{tasks.facetLink}" actionExpression="linkAction"/>
       </f:facet>
     </webuijsf:commonTask> 
     <webuijsf:commonTask id="task2" text="#{tasks.tskTxt2}" actionExpression="task2" />
     <webuijsf:commonTask id="task3" text="#(tasks.tskTxt3)" onClick="popup();return false;"/>
  </webuijsf:commonTaskGroup>
</webuijsf:commonTasksSection>

Example 3: Displaying a task's toggled info panel by using tag attributes

<webuijsf:commonTasksSection id="tasks1" title = "#{tasks.tskTtl}">
   <webuijsf:commonTaskGroup id="Taskgroup1" title="#{tasks.grpTtl}" >
       <webuijsf:commonTask id="task1" text="#{tasks.tskTxt1}" actionExpression="task1"
                          infoTitle = "#{tasks.tskTtl1}" infoText="#{task.tskTxt1}"
                          infoLinkText="#{tasks.lnkTxt}" infoAction="task1Help"/>
       <webuijsf:commonTask id="task2" text="#{tasks.tskTxt2}" actionExpression="task2"
                          infoTitle = "#{tasks.tskTtl2}"
                          infoLinkText="#{tasks.lnkTxt2}" infoAction="task2Help"
                          infoText="#{tasks.tskTxt2}"/>
   </webuijsf:commonTaskGroup>
</webuijsf:commonTasksSection>

Example 4: Using the infoPanel facet to display toggled info panel

<webuijsf:commonTasksSection id="tasks1" title = "#{tasks.tskTtl}">
   <webuijsf:commonTaskGroup id="Taskgroup1" title="#{tasks.grpTtl}" >
      <webuijsf:commonTask id="task1" text="#{tasks.tskTxt1}" actionExpression="task1" />
         <f:facet name="infoPanel">
          <webuijsf:panelGroup id="panelGrp1">
           <webuijsf:staticText id="staticText1" text="#{tasks.tskInf}"/>
           <webuijsf:image id="image2" url="/images/dot.gif"/>
          </webuijsf:panelGroup>
         </f:facet>
      </webuijsf:commonTask> 
      <webuijsf:commonTask id="task2" text="#{tasks.tskTxt2}"
                           actionExpression="task2" infoTitle = "#{tasks.lnkTtl2}"
                           infoText="#{tasks.tskTxt2}"/>
  </webuijsf:commonTaskGroup>
</webuijsf:commonTasksSection>

Example 5: Using the infoLink facet to add a link to info panel

<webuijsf:commonTasksSection id="tasks1" title ="#{tasks.tskTtl}">
  <webuijsf:commonTaskGroup id="Taskgroup1" title="#{tasks.grpTtl}" >
     <webuijsf:commonTask id="task1" text="#{tasks.tskTxt1}"
                          actionExpression="task1" infoTitle = "#{task.tskTtl1}"
                          infoText="#{task.tskTxt1}" infoLinkText="#{task.lnkTxt}"
                          infoAction="task1Help" />
     <webuijsf:commonTask id="task2" text="#{tasks.tskTxt2}"
                          actionExpression="task2" infoTitle = "#{task.tskTtl2}"
                          infoText="#{task.tskTxt2}">
             <f:facet name="infoLink">
                  <webuijsf:hyperlink id="link" text="#{task.PnlLnk}" url="http://www.google.com"/> 
             </f:facet>
     </webuijsf:commonTask>
  </webuijsf:commonTaskGroup>
</webuijsf:commonTasksSection>



Tag Information
Tag Classcom.sun.webui.jsf.component.CommonTaskTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
bindingfalsefalsejava.lang.String A ValueExpression that resolves to the UIComponent that corresponds to this tag. This binding allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children.
onDblClickfalsefalsejava.lang.String

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

onKeyPressfalsefalsejava.lang.String

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

targetfalsefalsejava.lang.String

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

onFocusfalsefalsejava.lang.String

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.

infoTitlefalsefalsejava.lang.String

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

onKeyUpfalsefalsejava.lang.String

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

onMouseUpfalsefalsejava.lang.String

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

styleClassfalsefalsejava.lang.String

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

iconfalsefalsejava.lang.String

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

stylefalsefalsejava.lang.String

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

onClickfalsefalsejava.lang.String

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

infoLinkTextfalsefalsejava.lang.String

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

onBlurfalsefalsejava.lang.String

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

toolTipfalsefalsejava.lang.String

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.

onMouseDownfalsefalsejava.lang.String

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

imageHeightfalsefalsejava.lang.String

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

imageUrlfalsefalsejava.lang.String

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.

onMouseOutfalsefalsejava.lang.String

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

onMouseOverfalsefalsejava.lang.String

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

infoTextfalsefalsejava.lang.String

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

onMouseMovefalsefalsejava.lang.String

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

textfalsefalsejava.lang.String

The text to be displayed for the task.

imageWidthfalsefalsejava.lang.String

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

visiblefalsefalsejava.lang.String

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.

infoLinkUrlfalsefalsejava.lang.String

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

onKeyDownfalsefalsejava.lang.String

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

tabIndexfalsefalsejava.lang.String

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.

actionExpressionfalsefalsejava.lang.String MethodExpression representing the application action to invoke when this component is activated by the user. The expression must evaluate to a either a String or a public method that takes no parameters, and returns a String (the logical outcome) which is passed to the NavigationHandler for this application.
actionListenerExpressionfalsefalsejava.lang.String Use the actionListenerExpression attribute to cause the component to fire an event. The value must be an EL expression and it must evaluate to the name of a public method that takes an ActionEvent parameter and returns void.
renderedfalsefalsejava.lang.String Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.
idfalsetruejava.lang.StringNo Description

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.