Foren
portlet:renderURL scope
Abraham Abe, geändert vor 11 Jahren.
portlet:renderURL scope
New Member Beiträge: 2 Beitrittsdatum: 20.01.13 Neueste Beiträge
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/>">« 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
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/>">« 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
Samuel Kong, geändert vor 11 Jahren.
RE: portlet:renderURL scope
Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
Just do what you did in view.jsp. Add the jspPage parameter to the portlet:renderURL.
Abraham Abe, geändert vor 11 Jahren.
RE: portlet:renderURL scope
New Member Beiträge: 2 Beitrittsdatum: 20.01.13 Neueste Beiträge
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
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
Ajeet Singh, geändert vor 11 Jahren.
RE: portlet:renderURL scope
New Member Beiträge: 14 Beitrittsdatum: 27.03.12 Neueste Beiträge
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
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