Unable to make the DropDown custom list work

8 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

Alexandre Gacon

unread,
Dec 30, 2025, 9:34:26 AM12/30/25
to mapstor...@googlegroups.com
Hello,

We are trying to configure a DropDown list editor for a given layer+attribute couple and we haven't managed to do it up to now.

The configuration done in our map context for the FeatureEditor plugin looks like this:

{
  "cfg": {
    "editingAllowedRoles": [
      "ADMIN",
      "USER"
    ],
    "customEditorsOptions": {
      "rules": [
        {
          "regex": {
            "attribute": "^avancement$",
            "typeName": "^smart_energies:couche_collaborative_polygones$"
          },
          "editor": "DropDownEditor",
          "editorProps": {
            "values": [
              "Construction",
              "Exploitation",
              "Développement",
              "Autre"
            ]
          }
        }
      ]
    }
  },
  "override": {}
}

and in our geoserver instance we have a feature layer

smart_energies:couche_collaborative_polygones with a field avancement.

When we create a map with this map context and we try to edit the layer, we never have our DropDownEditor. We have the default behavior.

What should we change to have it working? We use the last version of MapStore and the last version of GeoServer.

--
Alexandre Gacon

Lorenzo Natali

unread,
Jan 5, 2026, 6:31:03 AMJan 5
to mapstor...@googlegroups.com
Hi,
I tested your configuration on the latest master in a context and it works fine (below the configuration I used).
Try to figure out if the layer name and attribute name is correct and regular expression properly match, taking into account also the case (it is case sensitive).

image.png
{
  "cfg": {
    "editingAllowedRoles": [
      "ADMIN",
      "USER"
    ],
    "customEditorsOptions": {
      "rules": [
        {
          "regex": {
            "attribute": "^STATE_NAME$",
            "typeName": "^gs:us_states$"

          },
          "editor": "DropDownEditor",
          "editorProps": {
            "values": [
              "Construction",
              "Exploitation",
              "Développement",
              "Autre"
            ]
          }
        }
      ]
    }
  },
  "override": {}
}
--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mapstore-users/CAFJaAp73wNPePJa7K9qKEAym2U1txR%3Dbg9SwB-rGMzf4P-OpBg%40mail.gmail.com.

Alexandre Gacon

unread,
Jan 5, 2026, 6:53:44 AMJan 5
to mapstor...@googlegroups.com
Hi Lorenzo,

Thank you for your feedback. I managed to have it working by saving my map after creation; without saving the menu has the default behavior.

Regards
Alexandre



--
Alexandre Gacon

Lorenzo Natali

unread,
Jan 5, 2026, 8:37:35 AMJan 5
to mapstore-users
Ok, now I understood the misunderstanding.
Yes, make sense. 
According with the current workflow, when you create the map, in order to allow you to add layers etc.., the default context is used. As well as you save the map, the context will be effectively used.

Reply all
Reply to author
Forward
0 new messages