JSF Showcase
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.![](https://www.liferayfaces.org:443/de/jsf-showcase?p_p_id=1_WAR_comliferayfacesdemojsfshowcaseportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=&p_p_col_count=0&_1_WAR_comliferayfacesdemojsfshowcaseportlet_ln=images&_1_WAR_comliferayfacesdemojsfshowcaseportlet_javax.faces.resource=jsf-logo-small.png)
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