Fix for AWC-1436

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6307 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-07-20 11:13:48 +00:00
parent 0f9076fad3
commit b0fbeea21a
5 changed files with 17 additions and 10 deletions

View File

@@ -351,6 +351,7 @@ public class UIRichList extends UIComponentBase implements IDataContainer
public void setCurrentPage(int index)
{
this.currentPage = index;
this.sortOrPageChanged = true;
}
/**
@@ -405,13 +406,14 @@ public class UIRichList extends UIComponentBase implements IDataContainer
{
this.sortColumn = column;
this.sortDescending = descending;
this.sortOrPageChanged = true;
// delegate to the data model to sort its contents
// place in a UserTransaction as we may need to perform a LOT of node calls to complete
UserTransaction tx = null;
try
{
if (getDataModel().size() > 64)
if (getDataModel().size() > 16)
{
FacesContext context = FacesContext.getCurrentInstance();
tx = Repository.getUserTransaction(context, true);
@@ -537,7 +539,11 @@ public class UIRichList extends UIComponentBase implements IDataContainer
}
// reset current page
this.currentPage = 0;
if (this.sortOrPageChanged == false)
{
this.currentPage = 0;
}
this.sortOrPageChanged = false;
}
return this.dataModel;
@@ -566,6 +572,7 @@ public class UIRichList extends UIComponentBase implements IDataContainer
private int rowIndex = -1;
private int maxRowIndex = -1;
private int pageCount = 1;
private boolean sortOrPageChanged = false;
private static Log logger = LogFactory.getLog(IDataContainer.class);
}