掲示板

Opening a jsp from within a portlet

11年前 に Lior Hadaya によって更新されました。

Opening a jsp from within a portlet

Regular Member 投稿: 138 参加年月日: 12/01/24 最新の投稿
Hello,

I'm using Liferay EE 6.1.20 and I want to open another JSP (not view.jsp), in a pop up window. The jsp I'm trying to open is in fact the configuration JSP which shows when clicking the portlet's configuration icon.

I tried to do this, but all it does is open the portlet in a new window and show view.jsp:

<portlet:renderurl var="portletSettingsURL" windowstate="<%= LiferayWindowState.EXCLUSIVE.toString() %>" portletmode="view">
  <portlet:param name="jspPage" value="/jsp/Configuration.jsp" />
</portlet:renderurl> 

<a href="<%=portletSettingsURL%>">config url</a>


My jsp is located under /WEB-INF/jsp
Is this supposed to work? Keep in mind I am not using MVCPortlet, but rather Spring MVC.

Please advise,

Thanks a lot,
Lior
thumbnail
11年前 に Hari Dobbala によって更新されました。

RE: Opening a jsp from within a portlet

Junior Member 投稿: 29 参加年月日: 12/11/18 最新の投稿
Hi,

instead of using LiferayWindowState.EXCLUSIVE.toString() , I think u can use LiferayWindowState.POP_UP.toString() to open the jsp in separate popup.

Hope it may help you.
thumbnail
11年前 に Tejas Kanani によって更新されました。

RE: Opening a jsp from within a portlet

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
Hi Lior,

Try below code, I've used aui script to do the same.

<portlet:renderurl var="portletSettingsURL" windowstate="<%= LiferayWindowState.POP_UP.toString() %>">
     <portlet:param name="jspPage" value="/jsp/Configuration.jsp" />
</portlet:renderurl>

<a href="#" onclick="openConfigPopup()">config url</a>

<script type="text/javascript">
	function openConfigPopup() 
	{
		AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
			var dialog = new A.Dialog({
			        title: 'Configuration',
			        centered: true,
			        draggable: true,
			        modal: true,
			        width: 635, 
			        height: 400,
			    }).plug(A.Plugin.IO, {uri: '<%=portletSettingsURL%>'}).render();
			dialog.show();
		});
	}
</script>


Thanks,
Tejas
9年前 に Ashok Siddaiah によって更新されました。

RE: Opening a jsp from within a portlet

New Member 投稿: 5 参加年月日: 13/08/13 最新の投稿
Hi, iam working on opening a web-form portlet on click of a button. I was able to get the popup on click of button. But the problem is it is always showing the default web-form fields such as Suggestions, Name, Rating, Comments form. I have configured the web form to have fields such as Feedback, Impact and Risk text fields. Can you please let me know why it is loading the default form rather than my custom form? Please this is very urgent, please help me.

Note: I have specified the portletID of the form in view.jsp which is my custom web form portlet.Please see my attachment in this comment for screenshot.