JSF Showcase

portlet:resourceURL

ResourceURL is a UIComponent that provides the ability to get a ResourceURL that invokes the RESOURCE_PHASE of the portlet lifecycle targeting the current portlet.

General Usage

Specify portlet:param as a child tag in order to add portlet resource parameters to the URL. The example below shows how to specify the javax.faces.resource and ln portlet resource parameters in order to get a URL that targets a JSF image resource.

Source Code

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:portlet="http://java.sun.com/portlet_2_0"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

	<portlet:resourceURL escapeXml="false" var="resourceURL">
		<portlet:param name="javax.faces.resource" value="jsf-logo-small.png" />
		<portlet:param name="ln" value="images" />
	</portlet:resourceURL>
	<img src="#{resourceURL}" />

</ui:composition>
Liferay Faces Bridge Implementation 4.0.0 + Showcase Common 3.0.0 + Liferay Faces Util 3.0.1-SNAPSHOT + Mojarra 2.2.13