#159 improved error reporting for document-list (#1180)

- expose ‘error’ event
- change path only on successful navigation
- extend demo shell with error handling and reporting
- additional unit tests for document-list
This commit is contained in:
Denys Vuika
2016-11-30 14:52:06 +00:00
committed by Eugenio Romano
parent da70a72bba
commit 7eab89c5ef
8 changed files with 171 additions and 60 deletions

View File

@@ -38,6 +38,7 @@ declare let __moduleName: string;
export class FilesComponent implements OnInit {
currentPath: string = '/Sites/swsdp/documentLibrary';
errorMessage: string = null;
fileNodeId: any;
fileShowed: boolean = false;
multipleFileUpload: boolean = false;
@@ -120,6 +121,16 @@ export class FilesComponent implements OnInit {
this.router.navigate(['/activiti/tasksnode', event.value.entry.id]);
}
onNavigationError(err: any) {
if (err) {
this.errorMessage = err.message || 'Navigation error';
}
}
resetError() {
this.errorMessage = null;
}
private setupBpmActions(actions: any[]) {
actions.map(def => {
let documentAction = new DocumentActionModel();