Fórumok
portlet:renderURL scope
Abraham Abe, módosítva 11 év-val korábban
portlet:renderURL scope
New Member Bejegyzések: 2 Csatlakozás dátuma: 2013.01.20. Legújabb bejegyzések
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, módosítva 11 év-val korábban
RE: portlet:renderURL scope
Liferay Legend Bejegyzések: 1902 Csatlakozás dátuma: 2008.03.10. Legújabb bejegyzések
Just do what you did in view.jsp. Add the jspPage parameter to the portlet:renderURL.
Abraham Abe, módosítva 11 év-val korábban
RE: portlet:renderURL scope
New Member Bejegyzések: 2 Csatlakozás dátuma: 2013.01.20. Legújabb bejegyzések
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, módosítva 11 év-val korábban
RE: portlet:renderURL scope
New Member Bejegyzések: 14 Csatlakozás dátuma: 2012.03.27. Legújabb bejegyzések
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