留言板

Page Refresh Issue in Pagination

thumbnail
Gnaniyar Zubair,修改在14 年前。

Page Refresh Issue in Pagination

Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
Hi all,

I am including LIST page with pagination in my ADD page. In pagination, when i click Next / Prev link, the entire page is refreshed. But i want to refresh only my LIST page which is including in ADD page.

How to solve this?

- Gnaniyzr Zubair
thumbnail
delang j,修改在14 年前。

RE: Page Refresh Issue in Pagination

Expert 帖子: 252 加入日期: 08-7-14 最近的帖子
hi Gnaniyar,

did you find any solution yet? i want to do almost the same as yours. i took wol-portlet as my reference. so far it success but not pefectly.
breadcrumb and search show twice.

do you have any idea why it happen? really appreciate your help.

here screenshot


thanks
thumbnail
Gnaniyar Zubair,修改在14 年前。

RE: Page Refresh Issue in Pagination

Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
Hi delang,

In this case, you have to submit only division of your page. you have to use AjaxUtil method to submit the division. Then entire page will not refresh.



- Gnaniyar Zubair
thumbnail
delang j,修改在14 年前。

RE: Page Refresh Issue in Pagination

Expert 帖子: 252 加入日期: 08-7-14 最近的帖子
thanks for your reply. here my code on image gallery portlet. i dont know where is wrong. search form and breadcrumb appear twice on first click only!.


<div id="IGPix">
			<c:if test="<%= results.size() > 0 %>">
				<div class="taglib-search-iterator-page-iterator-top" id="searchImages">
					<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" />
				</div>
			</c:if>
			
				&lt;%@ include file="/html/portlet/image_gallery/view_images.jspf" %&gt;

			</div>
			
			<script type="text/javascript">
				jQuery(document).ready(function () {
						var searchImages = jQuery('#searchImages');
			
						searchImages.find('a').click(
							function(event) {
								var url = this.href.replace('p_p_state=normal', 'p_p_state=exclusive');
								//var parent = searchFriends.parent();
			
								jQuery('#IGPix').html('<div class="loading-animation" />');
			
								jQuery("#IGPix").load(url);
								return false;
							});
					});
			</script>


here the screeshot
thumbnail
Gnaniyar Zubair,修改在14 年前。

RE: Page Refresh Issue in Pagination

Liferay Master 帖子: 722 加入日期: 07-12-19 最近的帖子
HI,

1. Give division only for that included page :

<c:if test="<%= results.size() > 0 %>">
<div class="taglib-search-iterator-page-iterator-top" id="searchImages">
<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" />
</div>
</c:if>

<div id="IGPix">

<%@ include file="/html/portlet/image_gallery/view_images.jspf" %>

</div>
or

2. try to change the window state as maximized


- Gnaniyar Zubair
thumbnail
delang j,修改在14 年前。

RE: Page Refresh Issue in Pagination

Expert 帖子: 252 加入日期: 08-7-14 最近的帖子
1 here screenshot after done for step 1


2.it still the same when i change to maximized.

pagintaion work perfectly but breadcrumb and search form show double. look like it load from top
thumbnail
delang j,修改在14 年前。

RE: Page Refresh Issue in Pagination

Expert 帖子: 252 加入日期: 08-7-14 最近的帖子
i do the same thing on calendar portlet but same problem occur. is it a bug?
thumbnail
delang j,修改在14 年前。

RE: Page Refresh Issue in Pagination

Expert 帖子: 252 加入日期: 08-7-14 最近的帖子
solved!

i just change to this
jQuery('#portlet-wrapper-31 .portlet-content').load(url);


thanks
neelam bhandari,修改在12 年前。

RE: Page Refresh Issue in Pagination

Regular Member 帖子: 102 加入日期: 11-8-16 最近的帖子
Hi,
How to prevent the whole page refresh in while using liferay pagination?

I have placed my search container in a div like this :

<div id="results">
<liferay-ui:search-container delta="2" emptyResultsMessage="No Results Were found for the Selected Criteria">
<liferay-ui:search-container-results total="<%= properties.size() %>"
results="<%= ListUtil.subList(properties,searchContainer.getStart(),searchContainer.getEnd()) %>"/>
<liferay-ui:search-container-row modelVar="property" className="com.portal.domain.Property" >
<liferay-ui:search-container-column-jsp path="/WEB-INF/jsp/propertyDetail.jsp" align="left" />
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
</div>


How to prevent the whole page refresh ?

Many thanks
Neelam