Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » ComboBox for selecting a channel value(Channel with ComboBox)
ComboBox for selecting a channel value [message #1779258] Thu, 04 January 2018 14:27 Go to next message
Michael Geramb is currently offline Michael GerambFriend
Messages: 5
Registered: January 2018
Junior Member
Hi Community,

In my "Amazon Echo Control" binding have I a thing with a channel for the bluetooth connection with the device id. I want provide a drop down box where the user can select the name of the device. Is there already a way, that the ThingHandler can Provider the mapping list? This can not be a config value, because the user changes the connection at runtime.

There was already a similar discussion:

https://www.eclipse.org/forums/index.php/m/1743469/?srch=mapping#msg_1743469

Regards,
Michael

Re: ComboBox for selecting a channel value [message #1779422 is a reply to message #1779258] Sun, 07 January 2018 09:10 Go to previous messageGo to next message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
Hi Michael,
If I understand your scenario correctly, then ConfigOptionProvider is what you are looking for.
See e.g. SerialConfigOptionProvider.java as an example how to implement it.
Re: ComboBox for selecting a channel value [message #1779425 is a reply to message #1779422] Sun, 07 January 2018 09:53 Go to previous messageGo to next message
Michael Geramb is currently offline Michael GerambFriend
Messages: 5
Registered: January 2018
Junior Member
Hi Simon,
No I think this not what I'am looking for. The ConfigOptionProvider is only used for configuration. But I need the selection at runtime, where the ThingHandler provides the list. So It should work like this way: I want use a "Selection" element in the sitemap without the mappings, the selection element should than get the list of options from the channel.
But I think, currently there is no such an mechanism available.
Regards,
Michael

Re: ComboBox for selecting a channel value [message #1779471 is a reply to message #1779425] Mon, 08 January 2018 12:13 Go to previous messageGo to next message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
So you want to have a channel with a set of options to choose from and this set of selectable options should be dynamic (i.e. given by the handler)?
Have a look at the DynamicStateDescriptionProvider - it lets you "hook" in and puts the original state description in your hands so you can return a modified one.

PS: I just realized I've got to update the JavaDoc on the website again. It's not yet listed there...
Re: ComboBox for selecting a channel value [message #1779501 is a reply to message #1779471] Mon, 08 January 2018 19:49 Go to previous message
Michael Geramb is currently offline Michael GerambFriend
Messages: 5
Registered: January 2018
Junior Member
Hi Simon,
you are the best! I think this is exactly what I'am looking for. I will test it next weekend!
Thanks,
Michael
Previous Topic:Eclipse Kura
Next Topic:Role based access
Goto Forum:
  


Current Time: Tue Sep 25 06:42:33 GMT 2018

Powered by FUDForum. Page generated in 0.02360 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top