C H A P T E R  17

href


<jato:href>

Renders an HTML <a href="..." >...</a> element.

This tag is only valid when enclosed by a useViewBean, containerView, or tiledView tag. This tag may contain body content. This content will be included between the <a> and </a> tags of the rendered element and thus appear as the visible, clickable href element.

Example:

<jato:href name="orderDrillDown">See orders</jato:href>

The above would be rendered into the following HTML:

<a href="...(JATO URL)...?PageFoo.orderDrillDown=10345">See orders</a>

Attribute Name

Description

Notes

accessKey

Assigns an access key to the rendered HTML element. In general, the access key should be included in label text or wherever the access key is to apply.

RTExpr

anchor

The anchor value to append to the generated HREF.

RTExpr

disabled

Valid values: "true" or "false"

Disables the HTML control for user input.

  • Disabled controls do not receive focus
  • Disabled controls are skipped in tabbing navigation

If not specified, "false" is assumed.

RTExpr

defaultValue

The value to use, if the DisplayField view peer's value is null.

For an href tag, "value" refers to a special name-value pair that will be automatically included as part of the HREF's query string. The format for the implicit name-value pair is the following:

...?<qualified display field name>=<value>&...

This mechanism allows an href to have a display string as well as a value important to the application.

RTExpr

elementId

Assigns a name to an element. This name must be unique in an HTML document. Please note, this corresponds to the HTML "id" attribute. It has no specific meaning to the JATO framework.

The id attribute has several roles in HTML:

  • As a style sheet selector
  • As a target anchor for hypertext links
  • As a means to reference a particular element from a script

RTExpr

extraHtml

Arbitrary HTML that will be rendered just prior to the closing ">" of this HTML element

RTExpr

name

The name of the DisplayField peer. This peer must be a child of the current parent ContainerView, TiledView, or ViewBean. The DisplayField name is resolved relative to the current parent view.

The view peer must be of type <JATO package>.view.CommandField

This name may be a qualified view path, using forward slashes ("/") as delimiters. All components in the path except the last must refer to a ContainerView or a derivative of ContainerView (such as TiledView). Both relative and absolute paths are possible. If a name path begins with a forward slash, the name is assumed to be relative to the root view (the ViewBean). If the path does not begin with a forward slash, the name is assumed to refer to a child relative to the current container. Two dots ("..") may be used to refer to the container that is the parent of the current container.

Examples:

/header/orderList/customerName (absolute from root view)

orderList/customerName (relative to current container)

../footer/orderList/customerName (relative to parent)

Req

queryParams

Specifies an arbitrary number of name value pairs which will be appended to the HREF's query string.

The name value pairs should follow the format "name=value", where value is URL encoded by the JSP author as needed. Additional name value pairs must be delimited by the '&' character.

Example:

queryParams="fname=Mike&lname=Jones"

RTExpr

style

CSS styles to be applied to this HTML element.

RTExpr

styleClass

CSS stylesheet class to be applied to this HTML element.

RTExpr

tabIndex

Specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767.

 

target

A frame target

RTExpr

title

Offers advisory information about this element.

RTExpr

trim

Valid values: "true" or "false"

A value of "true" specifies that the tag content should be trimmed of all leading and trailing whitespace. A value of "false" preserves the whitespace.

If not specified, "true" is assumed.

 

 

This tag also supports the following JavaScript events:

onBlur, onChange, onClick, onDblClick, onFocus, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onSelect