0

Here is aikau Combobox usage:

{
    name: "alfresco/forms/controls/ComboBox",
    config: {
        fieldId: "someFieldId",
        label: "myListName",
        name: "assoc_sc_goods",
        addedAndRemovedValues: true,
        valueDelimiter: ",",
        firstValueIsDefault: false,
        showAllOptionsOnOpen: true,
        searchStartsWith: true,
        optionsConfig: {
                    queryAttribute: "label",
                    labelAttribute: "label",
                    valueAttribute: "name",
            publishTopic: "ALF_GET_FORM_CONTROL_OPTIONS",
            publishPayload: {
                resultsProperty: "options",
                url: url.context + "/proxy/alfresco/slingshot/datalists/lists/node/workspace/SpacesStore/11111111-1111-1111-1111-111111111111",
                itemsAttribute: "datalists",
                labelAttribute: "name",
                valueAttribute: "nodeRef"
            }
        }
    }
}

It displays all values from list with UUID 11111111-1111-1111-1111-111111111111 well, e.g. it shows names instead of nodeRef values. But when I press button on form, it sends

 "assoc_sc_goods_added": "goodName"

While it is expected

 "assoc_sc_goods_added": "workspace://SpacesStore/22222222-2222-2222-2222-222222222222"

Where 22222222-2222-2222-2222-222222222222 is UUID of selected list item.

It seems that Combobox request json, extract values for html select by labelAttribute but when it comes to apply selected values it forget to convert selected labelAttribute back to valueAttribute.

How configure aikau Combobox to fix such issue?

Cherry
  • 31,309
  • 66
  • 224
  • 364

1 Answers1

0

You need to change both valueAttribute settings to be "nodeRef" - currently only one of them is.

Dave Draper
  • 1,837
  • 11
  • 25