use of com.haulmont.cuba.web.app.folders.CubaFoldersPane in project cuba by cuba-platform.
the class WebFilterHelper method saveFolder.
@Override
@Nullable
public AbstractSearchFolder saveFolder(AbstractSearchFolder folder) {
Window.TopLevelWindow topLevelWindow = AppUI.getCurrent().getTopLevelWindow();
FoldersPane foldersPane = null;
if (topLevelWindow instanceof Window.HasFoldersPane) {
foldersPane = ((Window.HasFoldersPane) topLevelWindow).getFoldersPane();
}
if (foldersPane == null)
return null;
CubaFoldersPane foldersPaneImpl = foldersPane.unwrap(CubaFoldersPane.class);
AbstractSearchFolder savedFolder = (AbstractSearchFolder) foldersPaneImpl.saveFolder(folder);
foldersPaneImpl.refreshFolders();
return savedFolder;
}
use of com.haulmont.cuba.web.app.folders.CubaFoldersPane in project cuba by cuba-platform.
the class WebFilterHelper method removeFolderFromFoldersPane.
@Override
public void removeFolderFromFoldersPane(Folder folder) {
Window.TopLevelWindow topLevelWindow = AppUI.getCurrent().getTopLevelWindow();
FoldersPane foldersPane = null;
if (topLevelWindow instanceof Window.HasFoldersPane) {
foldersPane = ((Window.HasFoldersPane) topLevelWindow).getFoldersPane();
}
if (foldersPane == null) {
return;
}
CubaFoldersPane foldersPaneImpl = foldersPane.unwrap(CubaFoldersPane.class);
foldersPaneImpl.removeFolder(folder);
foldersPaneImpl.refreshFolders();
}
Aggregations