掲示板
Call another portlet from one Protlet
6年前 に Nirav Prajapati によって更新されました。
Call another portlet from one Protlet
Regular Member 投稿: 133 参加年月日: 15/06/25 最新の投稿
Hello Friends,
I am working on Liferay 6.2- CE-GA6.
I want to call another portlet from one portlet.
For Ex :
I have created two Portlet. Portlet A for home page (home.jsp) and Portlet-B for About Us page (aboutus.jsp).
While i am click on About Us link it will shows aboutus.jsp page of Portlet-B.
For that i have used liferay-portlet:renderURL.
Stuck up is that when i am click on that link it goes their successfully but it shows all the portlet which are reside in page with this particular (Calling) portlet is their.
I want to show only one Porltlet.
Please Help Me.
Thanks.
I am working on Liferay 6.2- CE-GA6.
I want to call another portlet from one portlet.
For Ex :
I have created two Portlet. Portlet A for home page (home.jsp) and Portlet-B for About Us page (aboutus.jsp).
While i am click on About Us link it will shows aboutus.jsp page of Portlet-B.
For that i have used liferay-portlet:renderURL.
<%
long portletId = 29105;
String Name = "RTIApplication_WAR_hpmcCRMportalportlet";
%>
<liferay-portlet:renderurl var="URLName" plid="<%= portletId %>" portletname="<%= Name.toString() %>" windowstate="<%=LiferayWindowState.NORMAL.toString() %>" copycurrentrenderparameters="true">
<liferay-portlet:param name="jspPage" value="/jsp/RTI/RTIForm.jsp" />
</liferay-portlet:renderurl>
<a href="<%= URLName %>">Click Here</a>
Stuck up is that when i am click on that link it goes their successfully but it shows all the portlet which are reside in page with this particular (Calling) portlet is their.
I want to show only one Porltlet.
Please Help Me.
Thanks.
6年前 に Ketan Solanki によって更新されました。
RE: Call another portlet from one Protlet (回答)
Junior Member 投稿: 63 参加年月日: 14/05/28 最新の投稿
I am not sure, if this answers your question but it may possibly help you to understand.
In Liferay, you create a page and in that page you put one or more portlets. When you redirect, you redirect to a page NOT the portlet. So basically all the portlets that are there on your that particular page are going to be visible!
Most probably, there is no way to show a set of portlets on a page when you redirect - unless there is some API which provides portlet's view based on conditions which I am unaware of!
If that's the case why don't you create 2 pages, one with all the portlets and other only with the portlet that you want! Now at this occasion, redirect to a page which contains only the portlet you want. That should do it.
Hope this helps...
In Liferay, you create a page and in that page you put one or more portlets. When you redirect, you redirect to a page NOT the portlet. So basically all the portlets that are there on your that particular page are going to be visible!
Most probably, there is no way to show a set of portlets on a page when you redirect - unless there is some API which provides portlet's view based on conditions which I am unaware of!
If that's the case why don't you create 2 pages, one with all the portlets and other only with the portlet that you want! Now at this occasion, redirect to a page which contains only the portlet you want. That should do it.
Hope this helps...
6年前 に Nirav Prajapati によって更新されました。
RE: Call another portlet from one Protlet
Regular Member 投稿: 133 参加年月日: 15/06/25 最新の投稿
Thanks Ketan,
You are right.
That's a real scenario in liferay for showing portlet.
Even i can also did same thing using assigning Role on portlet, that make my portlet visible/invisible according user login with appropriate role.
Thanks for answer
You are right.
That's a real scenario in liferay for showing portlet.
Even i can also did same thing using assigning Role on portlet, that make my portlet visible/invisible according user login with appropriate role.
Thanks for answer