Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Seeya S Kudtarker
Navigating to different jsp pages from menu bar in Liferay
4. Mai 2013 00:31
Antwort

Seeya S Kudtarker

Rang: Regular Member

Nachrichten: 187

Eintrittsdatum: 15. Januar 2013

Neue Beiträge

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
6. Mai 2013 00:04
Antwort

sridhar iyer

Rang: Junior Member

Nachrichten: 57

Eintrittsdatum: 27. Februar 2009

Neue Beiträge

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
6. Mai 2013 03:52
Antwort

Oliver Bayer

Rang: Liferay Master

Nachrichten: 829

Eintrittsdatum: 18. Februar 2009

Neue Beiträge

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
7. Mai 2013 05:56
Antwort

Seeya S Kudtarker

Rang: Regular Member

Nachrichten: 187

Eintrittsdatum: 15. Januar 2013

Neue Beiträge

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