Collection collection = CollectionDao.createInstance().retrieve(selectCollectionId);
List collectionFolders = collection.getFolders();
List collectionViewFolders = new ArrayList(collectionFolders.size());
for (Iterator it = collectionFolders.iterator(); it.hasNext(); ) {
collectionViewFolders.add(new ViewFolder((Folder) it.next()));
}
//Prepare the folderBean with appropriate values
DataModel foldersDataModel = new ListDataModel();
foldersDataModel.setWrappedData(collectionViewFolders);