loading... Pacem JS

Common Scenario

Having to set up a simple object (dictionary, name-value array) as an entity property is a common use case.
The PacemNameValueListElement is tailored to this kind of scenario.

Here's an exemplification of a typical dictionary editing, where names should be unique.
Flag dictionary is set to true;

Name-Value List

If the dictionary flag is false (default), then the value is interpreted as an array of name / value items (type: { name: string, value: any }).

Toggling the dictionary flag between true and false makes the component guess the best translation between object and typed array.

Metadata

The PacemNameValueListElement - as a dictionary only - can be included in an autogenerating form using the proper metadata.

{ "display": { "cssClass": ["form-minimal"] }, "props": [ { "prop": "metadata", "display": { "name": "Metadata", "cssClass": ["upload-std"], "ui": "dictionary" }, "type": "object", "validators": [ { "type": "required", "errorMessage": "Required field" } ] } ]}