Name

Command/Link

Synopsis

This renderer represents a command component as a link.

Component family:

javax.faces.Command

Renderer type:

javax.faces.Link

Renders children:

No

Encode behavior

Renders the component as an HTML <a> element an href attribute containing “#” and an onclick attribute containing JavaScript code for submitting the form the component belongs to with the component’s client ID as a request parameter. If the component has UIParameter component children, the generated JavaScript code also ensures that each parameter is included as request parameters when the form is submitted, with both the name and value URL encoded. The component’s children that are not UIParameter components are rendered as the content of the <a> element, i.e., as the link text or image.

Decode behavior

Looks for a request parameter with the component’s client ID as the name. If it finds the parameter and the type attribute isn’t reset, the renderer creates a javax.faces.event.ActionEvent and passes it to the component’s enqueueEvent() method.

Attributes

[accesskey="accessKey"] [charset="charset"] [coords="coords"]
[dir="ltr|rtl"] [hreflang="lang"] [lang="lang"]
[onblur="code"] [ondblclick="code"] [onfocus="code"] 
[onkeydown="code"] [onkeypress="code"] [onkeyup="code"]
[onmousedown="code"] [onmousemove="code"] [onmouseout="code"]
[onmouseover="code"] [onmouseup="code"]
[rel="rel"] [rev="rev"] [shape="shape"] [style="style"]
[styleClass="styleClass"] [tabindex="tabIndex"] [target="target"] [title=" ...

Get JavaServer Faces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.