portlet:resourceURL

PortletResourceURL 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://xmlns.jcp.org/portlet_3_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 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20