留言板

Return to Full Page link not working in my own portlet

thumbnail
Sanket K Mehta,修改在15 年前。

Return to Full Page link not working in my own portlet

Junior Member 帖子: 37 加入日期: 08-10-22 最近的帖子
Did anybody experience this ?
When v maximize the portlet and then click on Return to Full Page link, it works ok for local (built-in) portlets.

But when i upload my own portlets, this link isn't working ?
I tried this atleast for my own 10-12 portlets.

Any solution ?
Thanx in advance
thumbnail
Lari Tuominen,修改在15 年前。

RE: Return to Full Page link not working in my own portlet

Expert 帖子: 283 加入日期: 07-11-7 最近的帖子
Do you have any error messages?

- Lari
thumbnail
Sanket K Mehta,修改在15 年前。

RE: Return to Full Page link not working in my own portlet

Junior Member 帖子: 37 加入日期: 08-10-22 最近的帖子
No.
No error messages.
thumbnail
Peter Ruzicka,修改在15 年前。

RE: Return to Full Page link not working in my own portlet

Junior Member 帖子: 48 加入日期: 06-12-7 最近的帖子
Hi,

I had the same problem. I have analyzed the code. It is pretty much info and it would be great to have document about backUrl, lifecycle, state parameters etc.

Shortly - your problem may solve this line in liferay-portlet-ext.xml:

<restore-current-view>false</restore-current-view>

eg.
<portlet>
		<portlet-name>EXT_4</portlet-name>
		<struts-path>ext/library</struts-path>
		<use-default-template>false</use-default-template>
		<restore-current-view>false</restore-current-view>
</portlet>


From DTD:
<!--
Set the restore-current-view value to true if the portlet restores to the
current view when toggling between maximized and normal states. If set to false,
the portlet will reset the current view when toggling between maximized and
normal states. The default value is true.
-->


You can always set back URL (redirect etc) parameter which is in render_portlet.jsp evaluated like this:
urlBack = ParamUtil.getString(renderRequestImpl, "returnToFullPageURL");

---
If you want to understand it better you can start here render_portlet.jsp
String lifecycle = PortletRequest.RENDER_PHASE;

if (!portletDisplay.isRestoreCurrentView()) {
	lifecycle = PortletRequest.ACTION_PHASE;
}

.....

if (lifecycle.equals(PortletRequest.RENDER_PHASE)) {
	String portletNamespace = portletDisplay.getNamespace();

	Map renderParameters = RenderParametersPool.get(request, plid, portletDisplay.getId());

	Iterator itr = renderParameters.entrySet().iterator();

	while (itr.hasNext()) {
		Map.Entry entry = (Map.Entry)itr.next();

		String key = (String)entry.getKey();

		if (key.startsWith(portletNamespace)) {
			key = key.substring(portletNamespace.length(), key.length());

			String[] values = (String[])entry.getValue();

			urlMax.setParameter(key, values);
		}
	}
}


Good luck

Peter
thumbnail
Sanket K Mehta,修改在15 年前。

RE: Return to Full Page link not working in my own portlet

Junior Member 帖子: 37 加入日期: 08-10-22 最近的帖子
Ya.. Got it
Thanks a lot
thumbnail
Diego Morales,修改在9 年前。

RE: Return to Full Page link not working in my own portlet

Junior Member 帖子: 50 加入日期: 13-11-26 最近的帖子
I'm looking for this 6 years later. Thanks for the info.