cancel
Showing results for 
Search instead for 
Did you mean: 

setModel which has arrays in it and access properties when mapping

Former Member
0 Kudos

Hi, I have a Form with FormContainer. I am setting a json model to the form.

A sample is goes like this:


     contract: {

       visible: {

         contractType: true,

         validUntil: true,

         contractInfo: true

       },

       enabled: {

         contractType: false,

         validUntil: false,

         contractInfo: false

       },

       required: {

         contractType: false,

         validUntil: false,

         contractInfo: false

       }

     },

     salary: [{

       visible: {

         validFrom: true,

         validUntil: true,

         payType: true,

         salarySum: true,

         addSalaryBtn: false

       }

     }],

...

I am having no problem setting contract model part to formelements like (oUIProperties is the model name i have when setting the json model to the form):

visible: "{oUIProperties>/contract/visible/contractType}"

Question 1: Can I set a model for FormContainer? (If i try setting a model it says that mBindProperty is unknown or smth).

Question 2: How can I set properties which are in an array? The salary part of the model can have more than 1 element, since I can create more than 1 salary FormContainer and I want to bind the properties by accessing the salary array-s object properties.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

heh, turned out to be quite simple:

visible: "{oUIProperties>/salary/0/visible/validFrom}"



Answers (0)