Skip to content

Dependency injection for property pages #3351

@amolenaar

Description

@amolenaar

Is your feature request related to a problem?

The property editor (right pane) contains input fields for editing data in the selected model element. The property editor contents is constructed dynamically (based on the element type) from several smaller components called Property Pages.

Currently, for property pages there is no way to reach info from other places in the system.
This is most evident in the way transactions need to be handled with the @transactional decorator.

Describe the solution you'd like

When property pages are constructed, it should be possible to inject services. The injection mechanism can be similar to what we use for services: based on parameter name.

Describe alternatives you've considered

Leaving as is requires the property page to find the active session from a global context, which is more error prone.

Additional context

After this, we can drop the @transactional decorator.

The component_registry service may be able to provide the functionality. We should also be able to provide positional arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance related PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions