How to use the @nakedobjects/services.ViewType.Object function in @nakedobjects/services

To help you get started, we’ve selected a few @nakedobjects/services examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / gemini / src / dynamic-object / dynamic-object.component.ts View on Github external
protected setup(routeData: PaneRouteData) {
        if (!routeData.objectId) {
            return;
        }
        const oid = Ro.ObjectIdWrapper.fromObjectId(routeData.objectId, this.configService.config.keySeparator);

        if (oid.domainType !== this.lastOid) {
            this.lastOid = oid.domainType;
            this.parent.clear();

            this.customComponentService.getCustomComponent(this.lastOid, ViewType.Object).then((c: Type) => {
                const childComponent = this.componentFactoryResolver.resolveComponentFactory(c);
                this.parent.createComponent(childComponent);
            });
        }
    }
github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / gemini / src / custom-component.service.ts View on Github external
constructor(
        private readonly context: ContextService,
        private readonly config: CustomComponentConfigService) {

        this.customComponentCaches = [];
        this.customComponentCaches[ViewType.Object] = new CustomComponentCache(context, ObjectComponent);
        this.customComponentCaches[ViewType.List] = new CustomComponentCache(context, ListComponent);
        this.customComponentCaches[ViewType.Error] = new CustomComponentCache(context, ErrorComponent);

        config.configureCustomObjects(this.customComponentCaches[ViewType.Object]);
        config.configureCustomLists(this.customComponentCaches[ViewType.List]);
        config.configureCustomErrors(this);
    }
github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / cicero / src / cicero / cicero.component.ts View on Github external
private render() {
        switch (this.lastPaneRouteData.location) {
            case ViewType.Home:
                return this.ciceroRendererService.renderHome(this.lastPaneRouteData);
            case ViewType.Object:
                return this.ciceroRendererService.renderObject(this.lastPaneRouteData);
            case ViewType.List:
                return this.ciceroRendererService.renderList(this.lastPaneRouteData);
            default:
                return this.ciceroRendererService.renderError('unknown render error');
        }
    }
github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / gemini / src / custom-component.service.ts View on Github external
constructor(
        private readonly context: ContextService,
        private readonly config: CustomComponentConfigService) {

        this.customComponentCaches = [];
        this.customComponentCaches[ViewType.Object] = new CustomComponentCache(context, ObjectComponent);
        this.customComponentCaches[ViewType.List] = new CustomComponentCache(context, ListComponent);
        this.customComponentCaches[ViewType.Error] = new CustomComponentCache(context, ErrorComponent);

        config.configureCustomObjects(this.customComponentCaches[ViewType.Object]);
        config.configureCustomLists(this.customComponentCaches[ViewType.List]);
        config.configureCustomErrors(this);
    }
github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / src / app / app-routing.module.ts View on Github external
component: HomeComponent,
        canActivate: [AuthService],
        data: { pane: 1, paneType: 'single' },
        children: [
            { path: 'home', component: HomeComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'object', component: DynamicObjectComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'list', component: DynamicListComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'attachment', component: AttachmentComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'recent', component: RecentComponent, data: { pane: 2, paneType: 'split' } }
        ]
    },
    {
        path: 'gemini/object',
        component: DynamicObjectComponent,
        canActivate: [AuthService],
        data: { pane: 1, paneType: 'single', dynamicType: ViewType.Object },
        children: [
            { path: 'home', component: HomeComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'object', component: DynamicObjectComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'list', component: DynamicListComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'attachment', component: AttachmentComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'recent', component: RecentComponent, data: { pane: 2, paneType: 'split' } }
        ]
    },
    {
        path: 'gemini/list',
        component: DynamicListComponent,
        canActivate: [AuthService],
        data: { pane: 1, paneType: 'single' },
        children: [
            { path: 'home', component: HomeComponent, data: { pane: 2, paneType: 'split' } },
            { path: 'object', component: DynamicObjectComponent, data: { pane: 2, paneType: 'split' } },