Fórum
portlet:renderURL scope
Abraham Abe, modificado 11 Anos atrás.
portlet:renderURL scope
New Member Postagens: 2 Data de Entrada: 20/01/13 Postagens Recentes
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, modificado 11 Anos atrás.
RE: portlet:renderURL scope
Liferay Legend Postagens: 1902 Data de Entrada: 10/03/08 Postagens Recentes
Just do what you did in view.jsp. Add the jspPage parameter to the portlet:renderURL.
Abraham Abe, modificado 11 Anos atrás.
RE: portlet:renderURL scope
New Member Postagens: 2 Data de Entrada: 20/01/13 Postagens Recentes
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, modificado 11 Anos atrás.
RE: portlet:renderURL scope
New Member Postagens: 14 Data de Entrada: 27/03/12 Postagens Recentes
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