掲示板

portlet:renderURL scope

11年前 に Abraham Abe によって更新されました。

portlet:renderURL scope

New Member 投稿: 2 参加年月日: 13/01/20 最新の投稿
Hi

I am newbie to Liferay portlet development:

I have the following

In my view.jsp I have

<portlet:renderURL var="updatepage">
<portlet:param name="jspPage" value="/html/library/update.jsp" />
</portlet:renderURL>


In my update.jsp, I have

<%@ include file="/html/library/init.jsp" %>
<h1> Add / Edit Form </h1>
<a href="<portlet:renderURL/>">&laquo; Go Back</a>


Question:
How in update.jsp href to portlet:renderURL is taking me back to view.jsp
How is the url getting resolved to view.jsp page.

Please let me know.

Abe
thumbnail
11年前 に Samuel Kong によって更新されました。

RE: portlet:renderURL scope

Liferay Legend 投稿: 1902 参加年月日: 08/03/10 最新の投稿
Just do what you did in view.jsp. Add the jspPage parameter to the portlet:renderURL.
11年前 に Abraham Abe によって更新されました。

RE: portlet:renderURL scope

New Member 投稿: 2 参加年月日: 13/01/20 最新の投稿
Thanks Samuel for the response.
My question is renderURL something like a variable that can be accessed from any page once set.

Like example I set renderURL in page1 and then navigate page2->Page3->Page4

If in page4 I use this in href portlet:renderURL, will it contain page1 url.

Is portlet:renderURL like a application scope variable?

Please let me know.

Thanks
Abe
11年前 に Ajeet Singh によって更新されました。

RE: portlet:renderURL scope

New Member 投稿: 14 参加年月日: 12/03/27 最新の投稿
Hi Abraham,

If i am not wrong, renderUrl is not like a variable. It is one of the JSR standard tags which is used to create a url that points to render method of the portlet.

Now regarding your question that how is the url getting resolved to view.jsp.

It is being resolved, because you might not have overriden the render method in your controller (java file). It is taking bydefault view.jsp. I hope that if you rename your view.jsp name to some different name ( abc.jsp). It will not be resolved.

To make it resolved properly, you should override the render method and return the jsp name, whichever you want.

Regards,
Ajeet Singh