Portlet namespace
1.
namespace is basically a concept which help us in uniquely
differentiate among all instance of the same portlet that deployed in portal
server its portal container responsibility that it always produce a unique
namespace for an instance of a portlet.
2.
Here I am using instance word its means that if I am using same
portlet let say A diployed on two. different page or same page then name space
must be different .
3.
Namespacing ensures that the given name is uniquely associated
with this portlet and avoids name conflicts with other elements on the portal
page or with other portlets on the page.
Use of Name spaces .
To use it you must import standard
portlet library
<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet" %>
This tag produces a unique value
for the current portlet:
<portlet:namespace/>
This tag produces a unique value
for the current portlet. Namespacing ensures that the given name is uniquely
associated with this portlet and avoids name conflicts with other elements on
the portal page or with other portlets on the page.
<javasript>
<portlet:namespace/>test()
{
}
</javascript >
<A
HREF="javascript:<portlet:namespace/>test()">Encoded
name</a>
note you can also use this method
to get default name space .
getDefaultNamespace()
No comments:
Post a Comment