Foren

how to disable auto refresh?

kunal hemrajani, geändert vor 8 Jahren.

how to disable auto refresh?

Regular Member Beiträge: 109 Beitrittsdatum: 21.05.15 Neueste Beiträge
there is a problem occured when any portlet for ex. new message in pm clicked and after use it crossed the pade is reload again it affects performance required please suggest me the way to stop that ASAP.?
thumbnail
David H Nebinger, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Sorry junk not understand mixed words spelling bad not taking message serious.
kunal hemrajani, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Regular Member Beiträge: 109 Beitrittsdatum: 21.05.15 Neueste Beiträge
do you have a solution to stop refreshing the page automatically?
thumbnail
David H Nebinger, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Liferay does not refresh any page automatically. If it is happening to you it's likely because you coded it to do so.
kunal hemrajani, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Regular Member Beiträge: 109 Beitrittsdatum: 21.05.15 Neueste Beiträge
i mean i have a private messaging and iframe portlet in a page when i click new message in pm and crossed it after its use page is refresh again.i dont want that.
thumbnail
David H Nebinger, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Many of the default Liferay OOTB portlets do not support AJAX capabilities to handle AJAX-based submits and dom updates, they're basically written to use full page refreshes.

If you have a special need for AJAX and dom-based updates, you'll likely have to roll your own implementation.
kunal hemrajani, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Regular Member Beiträge: 109 Beitrittsdatum: 21.05.15 Neueste Beiträge
ok just tell me how to stop portal from refreshing??
thumbnail
Gautham PJ, geändert vor 8 Jahren.

RE: how to disable auto refresh?

New Member Beiträge: 4 Beitrittsdatum: 05.06.13 Neueste Beiträge
What David is trying to tell is that you have to write your own Javascript method which will update the contents of the iFrame.

Searched on google and found the below link. Please read all the comments.
Ajax response to iFrame
Hope the link at least guides you in the right direction.
kunal hemrajani, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Regular Member Beiträge: 109 Beitrittsdatum: 21.05.15 Neueste Beiträge
please specify this.My code is as follows:

<%--
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
* <%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
* <liferay-theme:defineObjects />
*
*
* <%= themeDisplay.getUser().getFirstName() %>
**/
--%>

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>

<%@ page import="com.liferay.portal.kernel.util.GetterUtil" %>
<%@ page import="com.liferay.portal.kernel.util.HttpUtil" %>
<%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
<%@ page import="com.liferay.portal.kernel.util.StringPool" %>
<%@ page import="com.liferay.portal.kernel.util.Validator" %>
<%@ page import="com.liferay.portal.util.PortalUtil" %>

<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>

<%@ page import="javax.portlet.PortletURL" %>

<portlet:defineObjects />

<%
String defaultHeight = GetterUtil.getString(portletConfig.getInitParameter("wai.connector.iframea.height.default"), "1500");

Map<String, String[]> parameterMap = new HashMap<String, String[]>(renderRequest.getParameterMap());

String appURL = ParamUtil.getString(request, "appURL", PortalUtil.getPathContext(renderRequest))+"/TableauAuthServlet";

parameterMap.remove("appURL");

appURL = appURL.concat(HttpUtil.parameterMapToString(parameterMap));

PortletURL portletURL = renderResponse.createRenderURL();

portletURL.setParameter("appURL", StringPool.BLANK);
%>

<div id="<portlet:namespace />iframeDiv">
<iframe frameborder="0" height="2300px" seamless="seamless" scrolling="yes" id="<portlet:namespace />iframe" src="<%= appURL %>" width="100%"></iframe>
</div


<script type="text/javascript">

</script>




what can i use to stop reload??
kunal hemrajani, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Regular Member Beiträge: 109 Beitrittsdatum: 21.05.15 Neueste Beiträge
any body have answer?
thumbnail
Olaf Kock, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
You seem to have run into the limits of using an iframe: You'll have to understand how this is handled browser-side, and every interaction with the portal *will* render the iframe again, potentially loosing whatever context you had in it. This might be a good time to consider writing a proper portlet (no iframe), to have a different collection of portlets on the page, or other changes in the architecture)

If this doesn't fit what you need: You only ask to "stop reloading", but you never mention under which circumstances what part is reloaded. There's a lot of interpretation to do. Most likely a lot of the interpretation will be wrong and not give you the answer you expect.
kunal hemrajani, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Regular Member Beiträge: 109 Beitrittsdatum: 21.05.15 Neueste Beiträge
I dont want after it reloading once. When i am doing any action like when i am opening message or any action in portal can refresh the page and iframe too.Due to integration from tableau i don't want my iframe to reload.
thumbnail
Olaf Kock, geändert vor 8 Jahren.

RE: how to disable auto refresh?

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
Well, if the document (read: Portal page) that contains your IFrame reloads, then your IFrame reloads with it. Nothing you can do about it - that's just plain HTML.

The only way out of this is to keep a lot of state in the iframe'd application - but that would be a question for the maintainers of that application, not Liferay. Or "just" rewrite the UI for that app to be a proper portlet, not IFrame content.