How to use the @nakedobjects/services.InteractionMode.Form 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 / object / object.component.ts View on Github external
.then((object: Ro.DomainObjectRepresentation) => {

                    // only change the object property if the object has changed
                    if (isChanging || wasDirty) {
                        this.object = this.viewModelFactory.domainObjectViewModel(object, routeData, wasDirty);
                    }

                    if (modeChanging || isChanging || wasDirty) {
                        if (this.mode === InteractionMode.Edit ||
                            this.mode === InteractionMode.Form ||
                            this.mode === InteractionMode.Transient) {
                            this.createForm(this.object!); // will never be null
                        }
                    }
                })
                .catch((reject: ErrorWrapper) => {
github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / view-models / src / domain-object-view-model.ts View on Github external
}
            return null;
        };
        const sav = selfAsValue();

        this.value = sav ? sav.toString() : '';
        this.reference = sav ? sav.toValueString() : '';
        this.selectedChoice = sav ? new ChoiceViewModel(sav, '') : null;

        this.colorService.toColorNumberFromType(this.domainObject.domainType())
            .then(c => this.color = `${this.configService.config.objectColor}${c}`)
            .catch((reject: ErrorWrapper) => this.error.handleError(reject));

        this.resetMessage();

        if (routeData.interactionMode === InteractionMode.Form) {
            forEach(this.actions, a => this.wrapAction(a));
        }
    }
github NakedObjectsGroup / NakedObjectsFramework / Spa2 / nakedobjectsspa / view-models / src / action-view-model.ts View on Github external
    private readonly showDialog = () => this.actionRep.extensions().hasParams() && (this.routeData.interactionMode !== InteractionMode.Form);