Ticket #335 (closed Enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

Association instance editor

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.1
Component: DeepaMehta Standard Distribution Version: 4.0.12
Keywords: Cc: dgf, Malte
Complexity: 5 Area:
Module: deepamehta-webclient

Description

The childs of an association instance should be editable according to the association type definition. Just like topics.

That is, when selecting an association, the detail panel renders all the child info, and when pressing Edit the corresponding form is rendered. Just like topics.

Change History

comment:1 Changed 12 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 12 years ago by jri

  • Cc dgf added

comment:3 Changed 12 years ago by Jörg Richter

Webclient: shared renderer code (#335).

The code of the default topic renderer is refactored in order to be used by both, the topic renderer and the association renderer.

The plugin's renderer directories may contain subdirectories with supplemental code.
Loading the supplemental code is up to the plugin.

IMPORTANT for plugin developers:
If you call methods of the default topic renderer you must adapt your code.

Instead of

var topic_renderer = dm4c.get_page_renderer("dm4.webclient.topic_renderer")
topic_renderer.create_page_model(...)
topic_renderer.render_page_model(...)
topic_renderer.build_topic_model(...)
topic_renderer.mode.INFO
topic_renderer.mode.FORM

write

dm4c.render.page_model.create_page_model(...)
dm4c.render.page_model.render_page_model(...)
dm4c.render.page_model.build_topic_model(...)
dm4c.render.page_model.mode.INFO
dm4c.render.page_model.mode.FORM

In preparation of "Association instance editor".

See ticket 335.

comment:4 Changed 12 years ago by Jörg Richter

Webclient: display association info (#335).

An association's simple and composite values are displayed in the detail panel.
The corresponding form is pending.

New in Webclient API:
The Topic's and Association's "composite" property contains true Topic objects (formerly plain JavaScript? objects).
This means the methods of the Topic prototype, e.g. get_type(), are available on objects accessed from a composite.
Calling the Topic constructor is not necessary anymore.
Example:

type = topic.compositemy.uri?.get_type()

See ticket 335.

comment:5 Changed 12 years ago by Jörg Richter

Webclient: association values form (#335).

The association's simple and composite values appear in the detail panel's form rendering.
Processing of changed values is pending.

IMPORTANT for plugin developers:
In your simple-renderers and multi-renderers when operating on the passed page_model(s)
you must consider these PageModel? property renamings:

    topic          -> object
    toplevel_topic -> toplevel_object
    topic_type     -> object_type

These renamings reflect the fact that a page model is no longer used exclusively for topics
but for associations as well.

Furthermore consider one method renaming:

    dm4c.render.page_model.build_topic_model
    ->
    dm4c.render.page_model.build_object_model

See ticket 335.

comment:6 Changed 12 years ago by Jörg Richter

Core: Association Instance editor works (#335).

An association's simple and composite values are editable in the detail panel.
Changes are persistent.

Core API:

COMPATIBILITY NOTES:
For production installation *before* the code is deployed one migration must be applied which sets an empty simple value ("") for all Instantiation (dm4.core.instantiation) associations.
For test installations you must reset the database.

See ticket 335.

comment:7 Changed 12 years ago by Jörg Richter

Webclient: shared renderer code (#335).

The code of the default topic renderer is refactored in order to be used by both, the topic renderer and the association renderer.

The plugin's renderer directories may contain subdirectories with supplemental code.
Loading the supplemental code is up to the plugin.

IMPORTANT for plugin developers:
If you call methods of the default topic renderer you must adapt your code.

Instead of

var topic_renderer = dm4c.get_page_renderer("dm4.webclient.topic_renderer")
topic_renderer.create_page_model(...)
topic_renderer.render_page_model(...)
topic_renderer.build_topic_model(...)
topic_renderer.mode.INFO
topic_renderer.mode.FORM

write

dm4c.render.page_model.create_page_model(...)
dm4c.render.page_model.render_page_model(...)
dm4c.render.page_model.build_topic_model(...)
dm4c.render.page_model.mode.INFO
dm4c.render.page_model.mode.FORM

In preparation of "Association instance editor".

See ticket 335.

comment:8 Changed 12 years ago by Jörg Richter

Webclient: display association info (#335).

An association's simple and composite values are displayed in the detail panel.
The corresponding form is pending.

New in Webclient API:
The Topic's and Association's "composite" property contains true Topic objects (formerly plain JavaScript? objects).
This means the methods of the Topic prototype, e.g. get_type(), are available on objects accessed from a composite.
Calling the Topic constructor is not necessary anymore.
Example:

type = topic.compositemy.uri?.get_type()

See ticket 335.

comment:9 Changed 12 years ago by Jörg Richter

Webclient: association values form (#335).

The association's simple and composite values appear in the detail panel's form rendering.
Processing of changed values is pending.

IMPORTANT for plugin developers:
In your simple-renderers and multi-renderers when operating on the passed page_model(s)
you must consider these PageModel? property renamings:

    topic          -> object
    toplevel_topic -> toplevel_object
    topic_type     -> object_type

These renamings reflect the fact that a page model is no longer used exclusively for topics
but for associations as well.

Furthermore consider one method renaming:

    dm4c.render.page_model.build_topic_model
    ->
    dm4c.render.page_model.build_object_model

See ticket 335.

comment:10 Changed 12 years ago by Jörg Richter

Core: Association Instance editor works (#335).

An association's simple and composite values are editable in the detail panel.
Changes are persistent.

Core API:

COMPATIBILITY NOTES:
For production installation *before* the code is deployed one migration must be applied which sets an empty simple value ("") for all Instantiation (dm4.core.instantiation) associations.
For test installations you must reset the database.

See ticket 335.

comment:11 Changed 12 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.