mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
6529: Fix for AWC-1506 "Configure Dashboard Wizard - no indication as to why new Components can not be added to the Selected list...." 6530: SDK remote dependencies for Axis jar rename 6531: Fixed XML blooper in sample config. 6532: AWC-1516 6533 FQDN case sensitivity 6534: Fixed WebServices query session cache in the cluster sample git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6743 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -264,6 +264,9 @@ public class DashboardWizard extends BaseWizardBean
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
Column column = this.editConfig.getCurrentPage().getColumns().get(this.column);
|
||||
// trim the max number of dashlets for this column
|
||||
LayoutDefinition layoutDef = this.editConfig.getCurrentPage().getLayoutDefinition();
|
||||
column.trimDashlets(layoutDef.ColumnLength);
|
||||
List<SelectItem> dashlets = new ArrayList<SelectItem>(column.getDashlets().size());
|
||||
for (DashletDefinition dashletDef : column.getDashlets())
|
||||
{
|
||||
@@ -276,7 +279,16 @@ public class DashboardWizard extends BaseWizardBean
|
||||
}
|
||||
return dashlets;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the number of dashlets currently displayed in the selected column
|
||||
*/
|
||||
public int getColumnDashletCount()
|
||||
{
|
||||
Column column = this.editConfig.getCurrentPage().getColumns().get(this.column);
|
||||
return column.getDashlets().size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return List of UIDescription objects for the available layouts
|
||||
*/
|
||||
|
@@ -403,4 +403,13 @@ final class Column
|
||||
{
|
||||
return this.dashlets;
|
||||
}
|
||||
|
||||
public void trimDashlets(int max)
|
||||
{
|
||||
if (max >= 0)
|
||||
{
|
||||
int maxTrim = Math.min(this.dashlets.size(), max);
|
||||
this.dashlets = this.dashlets.subList(0, maxTrim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user