Editor Widget and domains

265
2
Jump to solution
11-11-2019 03:40 AM
MatthieuThery1
Occasional Contributor

Hi,

I am trying to add domains to the editor widget's layer infos property. I can't seem to be able to make it work.

Here is a sample of what I am trying to do : https://codepen.io/mtrsklnkvMM/pen/rNNrYxd 

The domain property doesn't seem to be doing anything.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
MatthieuThery1
Occasional Contributor

I found the "problem". When coding your domains, you need to specify the type ("coded-value"), otherwise the _isDomainCompatible() function in the VM won't work. I guess I somehow believed it would "autocast".

domain:{
      codedValues: [{code:'Yes',name:'Yes'},{code:'No',name:'No'}],
      type:"coded-value"
}

I modified the pen above.

View solution in original post

0 Kudos
2 Replies
MatthieuThery1
Occasional Contributor

Any ideas? We'd really like to add domains (in code) when using the editor widget.

0 Kudos
MatthieuThery1
Occasional Contributor

I found the "problem". When coding your domains, you need to specify the type ("coded-value"), otherwise the _isDomainCompatible() function in the VM won't work. I guess I somehow believed it would "autocast".

domain:{
      codedValues: [{code:'Yes',name:'Yes'},{code:'No',name:'No'}],
      type:"coded-value"
}

I modified the pen above.

0 Kudos