How to
create render or action url
There are two ways by using that you
can create rebder or action url .
- First way of doing it by using tag library .
- Add the tag library I your JSP Page
<%@taglib
uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
- the above url is change for 168 portlet
- Add
Here I am creating renderURL only.Other
URL's can be created in the similar way
In JSP :
<portlet:renderURL var="renderURL " windowState="maximized" portletMode="edit">
<portlet:param name="param-name" value="param-value" />
<portlet:param name="param-name" value="param-value" />
</portlet:renderURL>
In JSP :
<portlet:renderURL var="renderURL " windowState="maximized" portletMode="edit">
<portlet:param name="param-name" value="param-value" />
<portlet:param name="param-name" value="param-value" />
</portlet:renderURL>
<portlet:actionURL/>: The
portlet actionURL tag creates a URL that must point to
the current portlet and must trigger an action request with the
supplied parameter. The parameters may be added to the URL by
including the param tag between theactionURL start
and end tags:
- By Using PortletURL class
<%
PortletURL renderURL = renderResponse.createRenderURL();
renderURL.setParameter("param-name", "param-value");
renderURL.setParameter("param-name", "param-value");
%>
<a href=”<%=renderURL%>” > URL to Hit </a>
In the above example param-name could
be "jspPage" and param-value could be "/html/edit.jsp"
if you want to navigate from current jsp page to some other jsp page
(in this case edit.jsp) . We can set other parameters also
as per our requirements.
Notepoint :-replace renderURL →
actionURL for action
No comments:
Post a Comment