フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Seeya S Kudtarker
Navigating to different jsp pages from menu bar in Liferay
2013/05/04 0:31
答え

Seeya S Kudtarker

ランク: Regular Member

投稿: 187

参加年月日: 2013/01/15

最近の投稿

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
2013/05/06 0:04
答え

sridhar iyer

ランク: Junior Member

投稿: 57

参加年月日: 2009/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>
Oliver Bayer
RE: Navigating to different jsp pages from menu bar in Liferay
2013/05/06 3:52
答え

Oliver Bayer

ランク: Liferay Master

投稿: 875

参加年月日: 2009/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
Seeya S Kudtarker
RE: Navigating to different jsp pages from menu bar in Liferay
2013/05/07 5:56
答え

Seeya S Kudtarker

ランク: Regular Member

投稿: 187

参加年月日: 2013/01/15

最近の投稿

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
2014/10/14 12:04
答え

Arunjyoti Banik

ランク: New Member

投稿: 8

参加年月日: 2014/08/25

最近の投稿

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