Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Seeya S Kudtarker
Navigating to different jsp pages from menu bar in Liferay
May 4, 2013 12:31 AM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

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
sridhar iyer
RE: Navigating to different jsp pages from menu bar in Liferay
May 6, 2013 12:04 AM
Answer

sridhar iyer

Rank: Junior Member

Posts: 57

Join Date: February 27, 2009

Recent Posts

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>
Oliver Bayer
RE: Navigating to different jsp pages from menu bar in Liferay
May 6, 2013 3:52 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 883

Join Date: February 18, 2009

Recent Posts

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
Seeya S Kudtarker
RE: Navigating to different jsp pages from menu bar in Liferay
May 7, 2013 5:56 AM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

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
Arunjyoti Banik
RE: Navigating to different jsp pages from menu bar in Liferay
October 14, 2014 12:04 PM
Answer

Arunjyoti Banik

Rank: Junior Member

Posts: 67

Join Date: August 25, 2014

Recent Posts

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