Which property in AWM for a simple List of String?


I want in my App Within Minutes a very simple List of string

In the backend I’m assigning it with

List items = new ArrayList(“Item1”,“Item2”,“etc.”)

doc.setStringListValue(MyClass, MY_PROPERTY, items);

But I can’t found the class object property fitting this setStringListValue function.

I don’t want a list of user, I don’t want either the “Database list” which seems complexe for my needs. And also static list doesn’t seems to fit what I want it looks more like a key/value map

I tried to put a string and to apply setStringListValue but I got an error

org.apache.solr.common.SolrException: ERROR: [doc=xwiki:OIDC.my_doc.WebHome_] multiple values encountered for non multiValued field property.Collaboratory.Apps.OIDC.Code.OIDCClass.my_property_sortString: [item1, item2]

Thanks :slight_smile:

And yet that’s what you are asking for :slightly_smiling_face:

The static list actually serves several use cases. The “Values” part is not really a Map, this is used to configure suggestions for the values of your list, but if you just want a free form list of values you can simply empty it, indicate “select” as DISPLAY TYPE and “Multiple Select” to allow storing several values.

I agree with you that it’s not very obvious and maybe AWM should have several entries that all leads to pre-configured static lists but for different use cases.

Thanks !