Search in sources :

Example 1 with FoldersService

use of com.haulmont.cuba.core.app.FoldersService in project cuba by cuba-platform.

the class FolderEditWindow method fillParentSelect.

protected void fillParentSelect() {
    parentSelect.removeAllItems();
    String root = getMessage("folders.searchFoldersRoot");
    parentSelect.addItem(root);
    parentSelect.setNullSelectionItemId(root);
    FoldersService service = AppBeans.get(FoldersService.NAME);
    List<SearchFolder> list = service.loadSearchFolders();
    for (SearchFolder folder : list) {
        if (!folder.equals(this.folder)) {
            parentSelect.addItem(folder);
            parentSelect.setItemCaption(folder, folder.getCaption());
        }
    }
}
Also used : FoldersService(com.haulmont.cuba.core.app.FoldersService) AbstractSearchFolder(com.haulmont.cuba.core.entity.AbstractSearchFolder) SearchFolder(com.haulmont.cuba.security.entity.SearchFolder)

Example 2 with FoldersService

use of com.haulmont.cuba.core.app.FoldersService in project cuba by cuba-platform.

the class CubaFoldersPane method getReloadedFolders.

protected List<AppFolder> getReloadedFolders() {
    List<AppFolder> folders = appFoldersTree.getItems().collect(Collectors.toList());
    FoldersService service = AppBeans.get(FoldersService.NAME);
    return service.reloadAppFolders(folders);
}
Also used : AppFolder(com.haulmont.cuba.core.entity.AppFolder) FoldersService(com.haulmont.cuba.core.app.FoldersService)

Example 3 with FoldersService

use of com.haulmont.cuba.core.app.FoldersService in project cuba by cuba-platform.

the class AppFolderEditWindow method fillParentSelect.

@Override
protected void fillParentSelect() {
    parentSelect.removeAllItems();
    String root = getMessage("folders.appFoldersRoot");
    parentSelect.addItem(root);
    parentSelect.setNullSelectionItemId(root);
    FoldersService service = AppBeans.get(FoldersService.NAME);
    List<AppFolder> list = service.loadAppFolders();
    for (AppFolder folder : list) {
        if (!folder.equals(this.folder)) {
            parentSelect.addItem(folder);
            parentSelect.setItemCaption(folder, getMessage(folder.getName()));
        }
    }
}
Also used : AppFolder(com.haulmont.cuba.core.entity.AppFolder) FoldersService(com.haulmont.cuba.core.app.FoldersService)

Aggregations

FoldersService (com.haulmont.cuba.core.app.FoldersService)3 AppFolder (com.haulmont.cuba.core.entity.AppFolder)2 AbstractSearchFolder (com.haulmont.cuba.core.entity.AbstractSearchFolder)1 SearchFolder (com.haulmont.cuba.security.entity.SearchFolder)1