# Component Dynamic ComboBox on Bean Info

**URL:** <https://forum.inductiveautomation.com/t/component-dynamic-combobox-on-bean-info/19156>\
**Category:** Module Development\
**Tags:** sdk, ignition79\
**Created:** [August 8, 2018, 9:49pm UTC](https://forum.inductiveautomation.com/t/component-dynamic-combobox-on-bean-info/19156 "2018-08-08T21:49:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [August 8, 2018, 9:49pm UTC](https://forum.inductiveautomation.com/t/component-dynamic-combobox-on-bean-info/19156/1 "2018-08-08T21:49:27Z")

</div>

I’m trying to create a custom editor on a component I’ve created that will pull a list of global resources and present them as a key/value pair dropdown. I tried using a JComboBox with a collection of custom classes like the Stack Overlfow answer [here](https://stackoverflow.com/questions/4822928/jcombobox-string-item-visible-and-integer-key-inherent).

When I look at my component in the designer, I’m left with text to the classpath of my inner class. Are there any examples of how to do this?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 8, 2018, 10:40pm UTC](https://forum.inductiveautomation.com/t/component-dynamic-combobox-on-bean-info/19156/2 "2018-08-08T22:40:14Z")

</div>

You need to override the combobox’s cell renderer (so that it examines the objects, and returns text in a useful way; specifically you need to override `getListCellRendererComponent`) or, if you just want to keep using the default cell renderer, then override `toString` on your objects.

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [August 8, 2018, 11:46pm UTC](https://forum.inductiveautomation.com/t/component-dynamic-combobox-on-bean-info/19156/3 "2018-08-08T23:46:03Z")

</div>

All I had to do was actually read the StackOverflow Post 😩

In addition I had to override the getValue and setValue methods of ConfiguratorEditorSupport to set my custom class, but return an integer because it was still expecting my custom class for some reason. It feels like a janky workaround but it’s working I think…

Thanks Paul.
