Multiple-select lists for build features

Hi, I'm trying to include a multi-select list as part of the configuration interface for a build feature plugin.  The multiple select list appears fine and is populated with the correct values, however only one selected item is stored within the plugin's configuration when the configuration is saved.

I think it's due to jthe etbrains.buildServer.controllers.admin.projects.PluginPropertiesUtil class only handling single-valued String values from the request parameter map, rather than checking to see if multiple values are available.

Could someone advise if there is any other way in which a multiple-select list can be implemented for a build feature JSP?

The code behind the plugin with the behaviour is available from https://github.com/rossrowe/sauce-teamcity-plugin/blob/master/sauceplugin-server/src/main/resources/buildServerResources/sauceSettings.jsp

Thanks,

Ross

2 comments
Comment actions Permalink

Ross, please submit a bug report in our tracker about such behavior in multi-select control.

For now, until we fix it, you can have some hidden property re-populated on each selection event from multi-select control with all the selected values separated by some character. In this case multi-select control does not have to be a property, as it's value is not needed. You'll also need to restore multi-select control from the hidden property when page is shown.

0
Comment actions Permalink

Thanks Pavel, I've raised http://youtrack.jetbrains.com/issue/TW-32265 for the issue, and I'll try update the plugin to use the hidden attributes as you suggested.

Cheers,

Ross

0

Please sign in to leave a comment.