Hii every Alfresco-man !!!
I want to add number of items in page dynamically in my alfresco share 5.2 .
for example show items in page by 10 or 30 or 40
for the static way the line : model.widgets[1].options.pageSize , but dynamic way i don't get how to do that
could you help me please
No response !!!
At which place you want to apply this functionality and up to now what you have tried?
Hii Sanjay ,
thks for your response ; I want to apply it on the documentlibrary.
I hope this is the answer you want
I tried :
model.widgets[i].options.pageSize = [10, 20,30];
but it doesn't work
Hi,
To get row per page dynamically,First of you have to configure dropdown in documentlibrary toolbar.
site-webscripts\org\alfresco\components\documentlibrary\include\documentlist_v2.lib.ftl
Put below code inside above file at proper place.
Ex.
<div>
<span id="${id}-rowPerPage-button" class="yui-button yui-push-button">
<span class="first-child">
<button>Row Per Page</button>
</span>
</span>
<select id="${id}-rowPerPage">
<option>10</option>
<option>20</option>
</select>
</div>
components\documentlibrary\documentlist.js
After that configure that select inside above file.
Ex.
if (Dom.get(this.id + "-rowPerPage"))
{
this.widgets.rowPerPage = Alfresco.util.createYUIButton(this, "rowPerPage-button", this.changePage, {
type: "menu",
menu: "rowPerPage"
});
if (this.widgets.rowPerPage !== null)
{
this.dynamicControls.push(this.widgets.rowPerPage);
}
}
You can take reference of sorting menu/documentlibrary view menu.
Some how you have to get selected option from rowPerPage and you need to set in this.options.pageSize.
I have not tried this scenario but you can set this way try.
If you succeed then please post your step/code so it will be helpful to others.
Thanks,
HELOOO!
Finally I can show my button and dropdown list , thks a lot. But I dont understand how can i link it with pageSize.
have you i link for sorting documentlibrary to take it as an example ?
thks a lot
Hi,
Did you got any solution , how to implement this because I need to implement this functionality.
Thanks in advance.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.