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,8 +539,12 @@ public class UIRichList extends UIComponentBase implements IDataContainer
}
// reset current page
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);
}

View File

@@ -14,7 +14,7 @@
<%-- Primary column for details view mode --%>
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col1-sort" label="#{msg.description}" value="name" mode="case-insensitive" styleClass="header"/>
<a:sortLink id="col1-sort" label="#{msg.description}" value="bpm:description" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="small-icon">
<a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/workflow_task.gif" showLink="false"
@@ -91,5 +91,5 @@
styleClass="inlineAction" />
</a:column>
<a:dataPager id="pager" styleClass="pager" />
<a:dataPager styleClass="pager" />
</a:richList>

View File

@@ -14,7 +14,7 @@
<%-- Primary column for details view mode --%>
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col1-sort" label="#{msg.description}" value="name" mode="case-insensitive" styleClass="header"/>
<a:sortLink id="col1-sort" label="#{msg.description}" value="bpm:description" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="small-icon">
<a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/workflow_task.gif" showLink="false"
@@ -99,5 +99,5 @@
styleClass="inlineAction" />
</a:column>
<a:dataPager id="pager" styleClass="pager" />
<a:dataPager styleClass="pager" />
</a:richList>

View File

@@ -14,7 +14,7 @@
<%-- Primary column for details view mode --%>
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col1-sort" label="#{msg.description}" value="name" mode="case-insensitive" styleClass="header"/>
<a:sortLink id="col1-sort" label="#{msg.description}" value="bpm:description" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="small-icon">
<a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/completed_workflow_task.gif" showLink="false"
@@ -83,5 +83,5 @@
styleClass="inlineAction" />
</a:column>
<a:dataPager id="pager" styleClass="pager" />
<a:dataPager styleClass="pager" />
</a:richList>

View File

@@ -14,7 +14,7 @@
<%-- Primary column for details view mode --%>
<a:column id="col1" primary="true" width="200" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col1-sort" label="#{msg.description}" value="name" mode="case-insensitive" styleClass="header"/>
<a:sortLink id="col1-sort" label="#{msg.description}" value="bpm:description" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="small-icon">
<a:actionLink id="col1-act1" value="#{r['bpm:description']}" image="/images/icons/workflow_task.gif" showLink="false"
@@ -91,5 +91,5 @@
styleClass="inlineAction" />
</a:column>
<a:dataPager id="pager" styleClass="pager" />
<a:dataPager styleClass="pager" />
</a:richList>