掲示板

How to access pages through Portlet

8年前 に Deepika V によって更新されました。

How to access pages through Portlet

Junior Member 投稿: 33 参加年月日: 15/06/16 最新の投稿
In my scenario i have page with login and register now portlet.

1. when i click on Registerbutton it should show Registration page (public page which i have created) but for now its only changing in that portlet not whole page.How to acheive this.

ex : In view.jsp there is register button.On click of that it calls registerform.jsp. I want this registerform.jsp to open in new window or redirect to other page9Registration page).

Same problem with login page also after logged in t should logged in username in different page(public page that i have created) .

How to access value/variable in one portlet in another page?

Ex: if i click on login button in shop page it should open login page in same window not refreshing only that portlet. After login in it should show another page.
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: How to access pages through Portlet

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
You're not in a servlet world any more Deepika. Your concept of "click a portlet button and whole page changes" just doesn't apply.

A portlet is only responsible for generating it's own html fragment. The portal is responsible for aggregating the fragments into a page for the browser.

A portlet cannot hijack the responsibility of the portal just to do it's own thing.
8年前 に Deepika V によって更新されました。

RE: How to access pages through Portlet

Junior Member 投稿: 33 参加年月日: 15/06/16 最新の投稿
Thanks for reply.

I m still in confusion in understanding the portlet.

So that means if i click button in one portlet cannot open the new page and it can only change the content in its own portlet.

Is that what u meant??


As i already told you i want to open registration whole page (not in same portlet window)when i click on register button in portlet. Is it not possible??

If yes please let me know the steps.

if not then how to achieve the scenario in liferay 6.2
thumbnail
8年前 に srikanth velugoti によって更新されました。

RE: How to access pages through Portlet

Junior Member 投稿: 79 参加年月日: 09/04/24 最新の投稿
Hi Deepika,
Simply provide the friendly url of the page in href url .

HTH,
velugoti
8年前 に Deepika V によって更新されました。

RE: How to access pages through Portlet

Junior Member 投稿: 33 参加年月日: 15/06/16 最新の投稿
Thanks for help.

do i need to hard code the page(Private and public) url in the code or Can i get the friendly URL of the page dynamically in the jsp page?
8年前 に Ronak Parekh によって更新されました。

RE: How to access pages through Portlet

Junior Member 投稿: 76 参加年月日: 15/04/06 最新の投稿
Hi Deepika,

Yes,as Srikanth suggested you can provide hardcoded friendly url of the page.
It should work.
thumbnail
8年前 に Olaf Kock によって更新されました。

RE: How to access pages through Portlet

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Deepika V:
do i need to hard code the page(Private and public) url in the code or Can i get the friendly URL of the page dynamically in the jsp page?


You might want to check out Liferay's API. Pages are technically called Layouts, so using LayoutServiceUtil's methods might give you some information. The current context is available to a portlet in the current themeDisplay object, a context holder that you can retrieve from any PortletRequest.

However, you might want to configure the URL rather then dynamically determining it: Because - what would be the criteria to find a certain page in order to forward to it? Do you know its friendly URL? Then just use it. What other aspects of the page do you want to use in order to find out which page to link to?

Check JSR-286 on the "portlet edit mode" (labeled "preferences" on the UI) or try Liferay's "configuration mode".

This might be beyond your experience with portlet development - you might want to start with learning the basics, e.g. from a book or a training. (shameless plug)