Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Dynamic combobox content generated out of the model
Dynamic combobox content generated out of the model [message #720807] Wed, 31 August 2011 05:24 Go to next message
Nepomuk Seiler is currently offline Nepomuk Seiler
Messages: 88
Registered: December 2010
Member
Hi,

That is excellent: http://www.eclipse.org/forums/index.php/t/236688/
Is there anything similar available for custom combobox-widget?

E.g. The "Map-Sample" in sapphire.samples. You can enter new locations and routes. However there aren't any suggestions, when you created a route, which location you can choose. So for example, if you have two locations [Munich], [Shanghai]. A combobox inside the tableViewer opens filled with these options.

Is that possible?
cheers, Muki
Re: Dynamic combobox content generated out of the model [message #720948 is a reply to message #720807] Wed, 31 August 2011 10:30 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 936
Registered: July 2009
Senior Member
Currently, our focus is on using the browse button approach to solve "possible values" scenarios, but there is an enhancement request open to provide an optional combo box rendering:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=346189

Also, work is currently in progress to hook-up CTRL+Space style of content proposals to text field property editor. This would work in conjunction with the browse button.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=354199

- Konstantin
Re: Dynamic combobox content generated out of the model [message #722091 is a reply to message #720948] Sun, 04 September 2011 08:00 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh Sampath
Messages: 213
Registered: July 2009
Senior Member
Hi Muki,

I tried this way,lets take the Ezbug example and we have IBugReport which has ProductStage property, by default Sapphire renders it with a radio buttons, if you want that to be changed to drop-down list you can just add an additional presentation hint "prefer.combo"

So your UI def (.sdef) for the drop-down property will look like ,

.....
<property-editor>
   <property>ProductStage</property>
    <hint>
         <name>prefer.combo</name>
          <value>true</value>
    </hint>
</property-editor>
.....


This will show the drop-down instead of the radio buttons.

PS: I use the latest stream build as I have the source code checked out and i build use from it. So please verify if this hint comes option for you in the "Hints" section of the property editor.

Just thought of suggesting it, please ignore it if this hit doesn't come as option with the version of Sapphire you are using.


~Kamesh

[Updated on: Sun, 04 September 2011 08:02]

Report message to a moderator

Re: Dynamic combobox content generated out of the model [message #722101 is a reply to message #722091] Sun, 04 September 2011 08:42 Go to previous messageGo to next message
Nepomuk Seiler is currently offline Nepomuk Seiler
Messages: 88
Registered: December 2010
Member
I'll give it a try. Thx Kamesh Smile
Re: Dynamic combobox content generated out of the model [message #722132 is a reply to message #722101] Sun, 04 September 2011 11:39 Go to previous message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 936
Registered: July 2009
Senior Member
The prefer.combo hint only works for Value<Enum> properties where the choice is between radio button or drop down list presentation. It does not work for Value<String> properties with PossibleValuesService. That's tracked here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=346189

[Updated on: Sun, 04 September 2011 11:40]

Report message to a moderator

Previous Topic:WIKI Article - Extending Sapphire Wizards
Next Topic:DiagramEditor - Manage nodes and edges separatly
Goto Forum:
  


Current Time: Fri Jul 25 14:18:41 EDT 2014

Powered by FUDForum. Page generated in 0.02485 seconds