[deepamehta-devel] Demonstrating in-topicmap data manipulation

Jörg Richter jri at deepamehta.de
Di Okt 29 20:14:24 CET 2013


On Oct 27, 2013, at 16:25, Jörn Weißenborn wrote:

> I can only work with the data of view. At topicmap level, I only have the view model of a topic, but no model of data. Lets say I have a note: I have no means to access the title or the body in this scope. But I would need that to do something useful.

Consider implementing a Viewmodel Customizer. The concept is described in the #505 comments:
https://trac.deepamehta.de/ticket/505

As an example see the Box Renderer plugins:
https://github.com/jri/dm4-box-renderer-canvas
https://github.com/jri/dm4-box-renderer-dom

Both plugins use the same viewmodel extension: while fetching a topicmap from the DB the topic viewmodels are enriched by "color" and "shape" values. In this case these values are stored/fetched as Topic Properties (via Property API). Analogous you could enrich e.g. Note topics with their Text-Body values (fetched via getRelatedTopic() in this case). 

Cheers,
Jörg




Mehr Informationen über die Mailingliste devel