Did you ever use valueList:property
trait? No? Maybe this article will change your mind.
What are traits
First things first. What are traits? Traits are used to enable additional configuration on our entities in the metadata model. They are either property traits (applied to properties) or entity traits (added to entities). Example can be a trait called fe:term
that allows to give a term subtype a different color. Link to the full list of traits as well as how to apply them can be found at the end of this article.
Why to use valueList:property trait
Now, what is valueList:property
trait? It is a trait that will (simply put) make properties look like terms. It will change the design from the underlined text or list of underlined entities to small boxes. While it adds more to the design of the layout, it can also be very beneficial for arrays of embedded objects. If you have many values for this type of property, Ataccama will show only first 10 values and additional will be on other pages. And without the ability to search through those values, you don’t know what all the values are without listing through all pages. Using this trait, you will see all values on one page.
Let’s show it on an example. Let’s say we have a new property in our glossary terms called Tags. We can have as many tags as we want. It’s implemented as some List of Values and in the term object we add tags as Embedded Object Array.
Now without the trait, I can see only first 10 tags and I cannot search through them in the term itself. When adding a new tag, I can only add one and I cannot see what tags were already added. Imagine there are 50 tags on 5 pages, you would have to go through all to verify if the tag is already there. There is no unique constraint by default, so duplicates are allowed.
The box for the tags itself looks like a big new table that takes a lot of space on the screen:
Now let’s add the valueList:property
trait to the tags
property in the metadata model and publish the change. And voilà:
Tags are displayed as small boxes, you see all of them right away and one more benefit: When you want to add more, you choose from checkboxes, and you see that the ones already added are already checked!
So, ready to try it out?