OCPSoft.com - Simple SolutionsCommunity Documentation

Chapter 8. * Rendering HTML links and URLs

8.1. The <pretty:link> component
8.2. The <pretty:urlbuffer> component
8.3. Using JSF standard components

PrettyFaces provides several methods of generating HTML links via a set of components, and when operating in a JSF 2.0 environment, standard JSF 'h:link' components may be used instead. If the provided mappingId requires any url-pattern-parameters or managed-query-parameters, they can be passed in via the <f:param> tag.

URL pattern parameters can be passed individually, as a java.util.List, or as an Array. In the latter two cases, toString() will be called on each of the objects in the list/array. If an empty or null list/array is passed, it will be ignored.

URL path-parameters do NOT have a name attribute, and are parsed in the order they are passed into the tag. Managed query-parameters DO have a name attribute, and order is irrelevant.

PrettyFaces provides a JSF component to output an HTML link to the page. The link tag requires a mapping-id (specified in the pretty-config.xml,) identifying which link to render.


PrettyFaces provides a JSF component to generate a URL for use as a page scoped variable through El. This tag requires a mapping-id (specified in the pretty-config.xml)


Caution

Mappings using DynaView functionality will not function with JSF link components.

Because PrettyFaces provides out-bound URL-rewriting, one can actually use standard JSF components such as <h:outputLink> in JSF 1.x, or <h:link> in JSF 2.x.


In JSF 2.x, you can achieve an even greater level of abstraction by using the mapping-ID in combination with <h:link>