How would I add a constraint property for attributes that are references ?

5
I'm making a grid widget (which has in-line editing) and I have an attribute (list of attributes that relate to columns) that could be a reference. Every column(cell in that column) has an editor depending on the type of the attribute. If the attribute is a reference and the editor is a dropdown containing all the entries for that referenced entity, how would I allow the widget user to add a constraint to that referenced entity ? The widgetFile allows one to set the entity(entityProperty) for a constraint, but I need to somehow allow the widget user to be able to set the constraint for the referenced entity. This is similar to having a datagrid where a referenced column is set to editable, but with having a constraint attached to its referenced entity. Should the widget user rather do this constraint somehow in the domain model, should I use a string for this constraint, should I add a microflow per attribute that retrieves this list instead of retrieving this list myself ? Or perhaps let each attribute have an entity and constraint, which should be ignored if the attribute is not a reference... Any opinion or conventions as per other widgets appreciated.
asked
1 answers
0

"The widgetFile allows one to set the entity(entityProperty) for a constraint, but I need to somehow allow the widget user to be able to set the constraint for the referenced entity."

Make an entity property first, with 'isPath="yes" ,pathType="referenceSet"'. Now use this entity property in the constraint and attribute properties (which no longer needs to be a referenced attribute).

You can take a look at the tag editor, which is a similar case

answered