JSF Showcase

portlet:namespace

Namespace is a UIComponent that provides the ability to get the portlet namespace.

General Usage

There are two basic ways to get the portlet namespace:
portletNamespace=_1_WAR_comliferayfacesdemojsfshowcaseportlet_
			
portletNamespace=_1_WAR_comliferayfacesdemojsfshowcaseportlet_
			

Source Code

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

	<!-- Example 1: Introducing a variable into the EL -->
	<portlet:namespace var="portletNamespace" />
	<pre>
		<h:outputText value="portletNamespace=#{portletNamespace}" />
	</pre>

	<!-- Example 2: Output directly to the response -->
	<pre>
		<h:outputText value="portletNamespace=" />
		<portlet:namespace />
	</pre>

</ui:composition>
Liferay Faces Bridge Implementation 4.1.0 + Showcase Common 3.0.1 + Liferay Faces Util 3.1.0 + Mojarra 2.2.14