掲示板

Document & Media portlet pagination problem

thumbnail
8年前 に Devang Patel によって更新されました。

Document & Media portlet pagination problem

Regular Member 投稿: 247 参加年月日: 15/01/19 最新の投稿
Hi Team,

I am facing one problem in search conatainer of Document & Media Portlet.
I have 25 items like folders and documents in the portlet. When I change display items from 20 to 10 and sort the document using (sort by) option.
Then it displays all the items not 10 items which I set.
I am using Liferay 6.2 ga3.

Thanks
Devang Patel
thumbnail
8年前 に Arun Das によって更新されました。

RE: Document & Media portlet pagination problem

Regular Member 投稿: 166 参加年月日: 12/07/23 最新の投稿
Hi,
You can set the default value in portal-ext.properties file. search.container.page.default.delta=10
This will change the default display items count.

Arun
thumbnail
8年前 に Devang Patel によって更新されました。

RE: Document & Media portlet pagination problem

Regular Member 投稿: 247 参加年月日: 15/01/19 最新の投稿
Hi Arun Das,

Thanks for quick reply.
But my problem didn't solve.

I have 25 items like folders and documents in the portlet. When I change display items from 20 to 10 and sort the document using (sort by) option.
Then it displays all the items not 10 items which I set.
I am using Liferay 6.2 ga3.

I want to know which action is performed on clicking sort by button.
So that I can solve this issue.
Is this Liferay's Bug?

Thank You
Deavng Patel
thumbnail
8年前 に Arun Das によって更新されました。

RE: Document & Media portlet pagination problem (回答)

Regular Member 投稿: 166 参加年月日: 12/07/23 最新の投稿
Hi,
Yes it seems like a bug. You can create an hook on \webapps\ROOT\html\portlet\document_library\sort_button.jsp
Add in
int entryStart = ParamUtil.getInteger(request, "entryStart");
int entryEnd = ParamUtil.getInteger(request, "entryEnd", entriesPerPage);

and modify the script to
<aui:script>
Liferay.provide(
window,
'<portlet:namespace />sortEntries',
function(folderId, orderByCol, reverseOrderByType) {
Liferay.fire(
'<portlet:namespace />dataRequest',
{
requestParams: {
'<portlet:namespace />folderId': folderId,
'<portlet:namespace />navigation': '<%= HtmlUtil.escape(navigation) %>',
'<portlet:namespace />struts_action': '/document_library/view',
'<portlet:namespace />fileEntryTypeId': <%= fileEntryTypeId %>,
'<portlet:namespace />viewEntries': <%= Boolean.FALSE.toString() %>,
'<portlet:namespace />viewEntriesPage': <%= Boolean.TRUE.toString() %>,
'<portlet:namespace />viewFolders': <%= Boolean.FALSE.toString() %>,
'<portlet:namespace />orderByCol': orderByCol,
'<portlet:namespace />orderByType': reverseOrderByType,
'<portlet:namespace />entryStart': <%= entryStart %>,
'<portlet:namespace />entryEnd': <%= entryEnd %>,

'<portlet:namespace />saveOrderBy': <%= Boolean.TRUE.toString() %>
}
}
);
},
['aui-base']
);
</aui:script>


HTH
Arun
thumbnail
8年前 に Devang Patel によって更新されました。

RE: Document & Media portlet pagination problem

Regular Member 投稿: 247 参加年月日: 15/01/19 最新の投稿
Thanks Arun Das

It works.

Thank You,
Devang Patel
thumbnail
8年前 に Arun Das によって更新されました。

RE: Document & Media portlet pagination problem

Regular Member 投稿: 166 参加年月日: 12/07/23 最新の投稿
Hi,
I just updated the code. I think you need to have entryStart also.

Arun
thumbnail
8年前 に Devang Patel によって更新されました。

RE: Document & Media portlet pagination problem

Regular Member 投稿: 247 参加年月日: 15/01/19 最新の投稿
Hi Arun Das,
Thanks.
But It already works without entryStart.

Thank You
Devang Patel
thumbnail
8年前 に Arun Das によって更新されました。

RE: Document & Media portlet pagination problem

Regular Member 投稿: 166 参加年月日: 12/07/23 最新の投稿
Hi,
Yea. But when there are multiple pages and you go to some other page other than the first page and try to sort, I'm not sure that works well. I really haven't tested out that scenario. But I think if there is an end, there should be a start somewhere. You test out different scenarios and let us know.emoticon

Arun
thumbnail
8年前 に Devang Patel によって更新されました。

RE: Document & Media portlet pagination problem

Regular Member 投稿: 247 参加年月日: 15/01/19 最新の投稿
Arun Das:
Hi,
Yea. But when there are multiple pages and you go to some other page other than the first page and try to sort, I'm not sure that works well. I really haven't tested out that scenario. But I think if there is an end, there should be a start somewhere. You test out different scenarios and let us know.emoticon

Hi Arun,
Thanks for quick reply.
Yes, You are right.emoticon

We have to pass entryStart.

Thank You,
Devang Patel