cancel
Showing results for 
Search instead for 
Did you mean: 

how to configure items per page value in properties file

chaituu
Champ in-the-making
Champ in-the-making
Hi,

how to configure items per page value dynamically(preferably in the properties file).presently 50 is hard coded in the respective js files.Do we need to do any customization to set this value in properties?if yes how to do the customization?

using alfresco 4.2.2 version.

pageSize:50

for document library
********************
C:\tomcat\webapps\share\components\documentlibrary\documentlist.js

for search
********************
C:\tomcat\webapps\share\components\search\search.js

4 REPLIES 4

niketapatel
Star Contributor
Star Contributor
Hi, You need to follow below steps.

In client side js, options can be passed from respective webscript. For documentlist.js follow below steps

1) Add page size value in property file.  documentlist-v2.get.properties located \share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary. Add like "page.size=20"

2)Add this page size as  documentList options in js file - documentlist-v2.get.js
pageSize : msg.get("page.size")

3) Refresh your script . This value will override hardcoded pageSize value in client side js file.

Need to add all changes in extension.

chaituu
Champ in-the-making
Champ in-the-making
Thanks for the update.there are so many files under documentLibrary. when are we going to use documentlist.get.js & documentlist.get.html.ftl files?If I open documentlist-v2.get.html.ftl its referenced documentlist.get.js but not documentlist-v2.get.js.there is lot of Confusion & there is no proper documentation on this about the use of these files?

when this documentlist-v2.get.html.ftl & documentlist.get.html.ftl files are getting called?

1)documentlist.get.js
2)documentlist-v2.get.js
3)documentlist-v2.get.html.ftl
4)documentlist.get.html.ftl

once more documentList.js file reside here in this path.

C:\Alfresco\tomcat\webapps\share\components\documentlibrary

First I would suggest to check basics of Alfresco data and presentation webscript so you will able to related ftl, js and xml file for one webscript. - Please check - https://wiki.alfresco.com/wiki/Web_Scripts

Other "when this documentlist-v2.get.html.ftl & documentlist.get.html.ftl files are getting called?" - From Alfresco 4.2 toolbar and document list are merged in one script and that is documentlist-v2 [URL: /components/documentlibrary/documentlist_v2]  and older one is documentlist. So currently in 4.2 documentlist_v2 is being used.

And documentList.js is client side share js file.

art99trash
Star Contributor
Star Contributor
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.