Skip to content

Create form to abstract class based on children attributes #419

@maurodlt

Description

@maurodlt

Is your feature request related to a problem?

I am currently modeling publications using an abstract class Publication with concrete subclasses such as Journal and Conference. However, the web editor does not support creating instances of abstract classes in a flexible way.

As a result:

  • There is no single, unified entry point for adding a publication.
  • The UI cannot dynamically adapt to the specific attributes required by different publication types.

This makes the publication creation process error-prone, redundant, and harder to extend when new publication types are introduced.

Describe the solution you'd like

Introduce a generic “Add Publication” page in the web editor that is linked to the abstract Publication class.

The proposed behavior is:

  1. The page initially presents the user with a dropdown or selection list of available concrete subclasses (e.g., Journal, Conference, …).

  2. Once a subclass is selected:

  • The form dynamically updates to display only the attributes relevant to that subclass.

  • Shared attributes defined in Publication (e.g., title, year, authors) are always shown.

  • Subclass-specific attributes (e.g., journal name, volume, issue, or conference location, proceedings) are conditionally displayed.

  1. On submission: The correct subclass instance is created and persisted.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions