mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
reduce dangers of creating the same xml content type by remove the possibility of multiple xml content types with the same name. sort content types alphabetically in the dropdown. refine reading of templating configuration.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3601 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package org.alfresco.web.bean.content;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
@@ -165,14 +165,15 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
|
||||
public List<SelectItem> getCreateTemplateTypes()
|
||||
{
|
||||
List<TemplateType> ttl = TemplatingService.getInstance().getTemplateTypes();
|
||||
Collection<TemplateType> ttl = TemplatingService.getInstance().getTemplateTypes();
|
||||
List<SelectItem> sil = new ArrayList<SelectItem>(ttl.size());
|
||||
Iterator it = ttl.iterator();
|
||||
while (it.hasNext())
|
||||
for (TemplateType tt : ttl)
|
||||
{
|
||||
TemplateType tt = (TemplateType)it.next();
|
||||
sil.add(new SelectItem(tt.getName(), tt.getName()));
|
||||
}
|
||||
|
||||
QuickSort sorter = new QuickSort(sil, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||
sorter.sort();
|
||||
return sil;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user