Make "reference" read-only based on a property of "source node"

Suppose Customer concept has a "location" reference.

In Customer's editor there's (%location% -> {locationName}) entry to show the location.

I want to make "location" editable based on a property of a Customer.

The problem is when I use

read-only: (editorContext, node) -> ... stuff on a {locationName}, then "node" is the Location itself, not the Customer. What is the proper way to access customer's properties when specifying styles for CellModel_RefCell -> CellModel_Property?

 

3 comments

Indeed, {locationName} evaluates the query in the context of the reference target. To access the properties of the reference source, you will need to be specifying "editable" on the CellModel_RefCell (aka %location%).

Vaclav

 

0

editable:false does not prevent "edit via ctrl+space autocomplete".

read-only: true at the {locationName} prevents all kinds of modifications.

0

Please sign in to leave a comment.