portlet:namespace

PortletNamespace 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

  1. <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
  2. xmlns:portlet="http://xmlns.jcp.org/portlet_3_0"
  3. xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
  4.  
  5. <!-- Example 1: Introducing a variable into the EL -->
  6. <portlet:namespace var="portletNamespace" />
  7. <pre>
  8. <h:outputText value="portletNamespace=#{portletNamespace}" />
  9. </pre>
  10.  
  11. <!-- Example 2: Output directly to the response -->
  12. <pre>
  13. <h:outputText value="portletNamespace=" />
  14. <portlet:namespace />
  15. </pre>
  16.  
  17. </ui:composition>
Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20