f-angi
4/18/2016 - 8:20 AM

Using a portlet namespace in javascript files

Using a portlet namespace in javascript files

  var NAMESPACE = A.one('carrello-namespace').getData('value');
  var PORTLET_NAMESPACE = NAMESPACE.replace(/^_/, '').replace(/_$/, ''); // used when setting the portletId of a resourceURL
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>

<carrello-namespace data-value="<portlet:namespace/>"></carrello-namespace>