Unable to set the list constraint property on the document

155 views Asked by At

This is my property and I am not able to set this on any document. The | separates the value in a pair like value and text.

<property name="ipo:bankDetail">
     <type>d:text</type>
     <default>Approve</default>
     <constraints>

      <constraint type="LIST">
       <parameter name="allowedValues">
        <list>
         <value>Approve|Some Approval label</value>
         <value>Reject|Some Reject label</value>
        </list>
       </parameter>
      </constraint>
     </constraints>
    </property>

While setting the property on any document I am getting below error message and unable to set the property

03050013 Found 1 integrity violations: Invalid property value: Node: workspace://SpacesStore/c675df16-9625-4a01-8629-830a75b2347d Name: Barcode Blog.txt Type: {http://www.test.com/model/content/1.0}contentType Property: {http://www.test.com/model/content/1.0}bankDetail Constraint: 03050012 The value is not an allowed value: Reject

I am following the question

1

There are 1 answers

6
Oussama Werfelli On

To display a different label you should use { }, for example <value>active|{Some Approval label}</value>

Otherwise, you can put you label in a message file (.properties) and use the message id, for example <value>Approve|{label.approve}</value>