掲示板

Navigating to different jsp pages from menu bar in Liferay

10年前 に Seeya S Kudtarker によって更新されました。

Navigating to different jsp pages from menu bar in Liferay

Regular Member 投稿: 187 参加年月日: 13/01/16 最新の投稿
I have created a menu bar using html,css, using lists etc. in Liferay The option on it are Home, Reports, User etc. When I click on each of them a sub menu appears. here is an example. I have a menu bar with Home, Reports, User, Add and when i click on say Reports a sub menu appears which has Legal,Documents,Personal,Company. When I click on any of them the jsp page should appear. Ex. If I click on Reports ans select Personal then Personal.jsp page should appear but it is not happening in my case in liferay. The menubar.jsp has links to pages. ex:

<li>
<a href="#">Reports</a>
<ul>
<li><a href="../admin/Legal.jsp">Legal</a></li>
<li><a href="../admin/Documents.jsp">Documents</a></li>
<li><a href="../admin/Personal.jsp">Personal</a></li>
<li><a href="../admin/Company.jsp">Company</a></li>
</ul>
</li>

When I try to access it the error that I am is:

The webpage at

http://localhost:8080/admin/Personal.jsp

might be temporarily down or it may have moved permanently to a new web address.

Although my path is correct I get the above error. Also when I use:

<a href="../admin/Personal.jsp">Personal</a>

I am redirected to the same page . Instead When I use

<a href="/admin/Personal.jsp">Personal</a>

I get the error mentioned above..

What is the solution?

Please note that The first time when I open my portlet with menubar the link in the address bar is:
http://localhost:8080/group/control_panel/manage?p_p_id=MISPortal_WAR_MISPortalportlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10180&refererPlid=10688

But later when I try to access pages from menu bar I cannot access them and the error highlighted in bold above is shown to me
thumbnail
10年前 に sridhar iyer によって更新されました。

RE: Navigating to different jsp pages from menu bar in Liferay

Junior Member 投稿: 57 参加年月日: 09/02/27 最新の投稿
can you try using portlet renderURL as the href link for your anchor tag
eg:
<portlet:renderURL var="legalURL">
<portlet:param name="jspPage" value="/Legal.jsp" />
</portlet:renderURL>

<ul>
<li><a href="<%= legalURL %>">Legal</a></li>
</ul>
10年前 に Oliver Bayer によって更新されました。

RE: Navigating to different jsp pages from menu bar in Liferay

Liferay Master 投稿: 894 参加年月日: 09/02/18 最新の投稿
Hi Seeya,

not sure why you have to directly link to jsps to implement your navigation menu. I would sugguest to create a custom theme for your static menu and put your links to different sites like e.g. "Reports" there.

HTH Oli
10年前 に Seeya S Kudtarker によって更新されました。

RE: Navigating to different jsp pages from menu bar in Liferay

Regular Member 投稿: 187 参加年月日: 13/01/16 最新の投稿
Hey Oliver:
Thanks for your reply..
I implemented it as follows:

<li><a href="<portlet:renderURL><portlet:param name="mvcPath" value="/admin/Personal.jsp"/></portlet:renderURL>">Personal</a></li>


Hope this helps if someone has the same problem
thumbnail
9年前 に Arunjyoti Banik によって更新されました。

RE: Navigating to different jsp pages from menu bar in Liferay

Junior Member 投稿: 74 参加年月日: 14/08/26 最新の投稿
Hi Seeya,

I am implementing the solution like you implemented but instead of going to the defined jsp the current page is getting refreshed. How to get over this problem, Can you help?

However I implemented using <portlet:actionUrl> and so had to write processAction and <init-param> stuff in portlet.xml

Arun