Ticket #566 (closed Defect: fixed)

Opened 9 years ago

Last modified 9 years ago

File content renderer fails when embedded in parent topic

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.1.3
Component: DeepaMehta Standard Distribution Version: 4.1.2
Keywords: Cc: dgf, Malte, JuergeN
Complexity: 3 Area:
Module: deepamehta-files


When e.g. File is a child type of Person, and a Person is selected the assigned file's content is not rendered in the detail panel (only the file's metadata are).

Thank you, JuergeN, for reporting!

Change History

comment:1 Changed 9 years ago by jri

  • Status changed from new to accepted

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

Webclient API: navigate parent page model (#567).

The format of the page model objects passed to renderers has slightly changed.
This breaks existing renderers (see below).
The standard renderers are adapted.

This fixes "File content renderer fails when embedded in parent topic" (see #566).


The page_model objects passed to a detail panel renderer (simple renderer or multi renderer) have an additional property:

parent -- the parent page model. Undefined for a top-level page model.

To e.g. access the parent topic from inside a simple render:



  • The page_model.toplevel_object property is gone. Use parent instead.

Note: you can navigate several levels up by chaining, e.g.:


Also consider using dm4c.selected_object which holds the object selected on the topicmap.

  • The arguments of the (client-side) option_topics hook are changed.

There is now a single page_model argument (instead of the former 3).

  • The arguments of dm4c.render.page_model.create_page_model() have changed:
    create_page_model(object, assoc_def, field_uri, render_mode, parent_page_model)

parent_page_model is new (for top-level page models pass undefined).
toplevel_object is gone.

  • The arguments of dm4c.render.page_model.extend_composite_page_model() have changed:
    extend_composite_page_model(object, assoc_def, field_uri, render_mode, page_model)

The 4th argument, toplevel_object, is gone.

See #567.

comment:3 follow-up: ↓ 4 Changed 9 years ago by JuergeN

I have tested it in the dm4nightly instance on the demo server. Looks good! :)

Last edited 9 years ago by JuergeN (previous) (diff)

comment:4 in reply to: ↑ 3 Changed 9 years ago by jri

Replying to JuergeN:

I have tested it in the dm4nightly instance on the demo server. Looks good! :)

Thanks for positive feedback!

However, there is one general problem when manually changing composite topics, that is via manipulation of associations: the parent topic's timestamp is not updated in this case. That means the browser will not refetch the topic and show its cached instance instead. A workaround is reloading the browser window.

comment:5 Changed 9 years ago by jri

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