Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » HowTo Make Data rendered as a combobox editiable
HowTo Make Data rendered as a combobox editiable [message #760711] Sun, 04 December 2011 11:05 Go to next message
St Clair Clarke is currently offline St Clair Clarke
Messages: 118
Registered: March 2010
Senior Member
Hello,
In the EzBug example, I see where the Version Property data is rendered as a combo-box.

I cannot see any hints/annotations etc to allow the combo box to be editable.

How do I make a combo-box and in general, Properties that use enums editable.

Thanks
Re: HowTo Make Data rendered as a combobox editiable [message #760880 is a reply to message #760711] Mon, 05 December 2011 09:05 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 937
Registered: July 2009
Senior Member
What is the scenario where an enum property needs free editing? By definition, the set of valid values held by an enum property is constrained at build time...

- Konstantin
Re: HowTo Make Data rendered as a combobox editiable [message #760889 is a reply to message #760880] Mon, 05 December 2011 09:16 Go to previous messageGo to next message
St Clair Clarke is currently offline St Clair Clarke
Messages: 118
Registered: March 2010
Senior Member
Thanks Konstantin,
I am uncertain if the enum mechanism is the correct or even the only option here. I was merely following the EzBug example.

Here is my scenario - with reference to a conventional combo box. Let say I have the combo that holds the title of a person as part of the person's full name. The combo is programmatically populated with the following items - Dr, Mr, Mrs. With the enum mechanism, there is no option to add another title such as "Professor", when registering a new person. How do I get around this for combo, and maybe on a broader level as it include Sapphire.

Thanks

Re: HowTo Make Data rendered as a combobox editiable [message #760893 is a reply to message #760889] Mon, 05 December 2011 09:22 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 937
Registered: July 2009
Senior Member
The scenario you have described would be better served by a plain string property with @PossibleValues or a custom PossibleValuesService. See @PossibleValues.invalidValueSeverity and PossibleValuesService.getInvalidValueSeverity() if you wish to specify that values outside of the provided possible values are ok.

The presentation used will be a text box with content assist and a browse button. There is also an enhancement request to provide a secondary presentation of an editable combo box.

- Konstantin
Re: HowTo Make Data rendered as a combobox editiable [message #760984 is a reply to message #760893] Mon, 05 December 2011 13:48 Go to previous message
St Clair Clarke is currently offline St Clair Clarke
Messages: 118
Registered: March 2010
Senior Member
Thanks,
Great!

St Clair
Previous Topic:e4 support for Sapphire
Next Topic:XMLBinding of a ListProperty - Removing container XML tag
Goto Forum:
  


Current Time: Mon Jul 28 22:45:18 EDT 2014

Powered by FUDForum. Page generated in 0.02566 seconds