Skip to main content



      Home
Home » Archived » Sapphire » Label on @PossibleValues
Label on @PossibleValues [message #1227703] Sun, 05 January 2014 04:39 Go to next message
Eclipse UserFriend
Hi,

what do you think about adding a label feature on the Possible Value Service?

The intention of that label is to use a different property for the display value, that is not necessarily the stored value. Or a display name consists of more than just the stored value.

So the idea would be to have something like this (or with use of EL) in the Contacts sample, more specifically on org.eclipse.sapphire.samples.contacts.Connection:
    // *** Name ***
    
    @Label( standard = "name" )
    @Required
    @NoDuplicates
    
    @PossibleValues
    ( 
        property = "/Contacts/Name",
        label = "/Contacts/Name (/Contacts/Category)", 
        caseSensitive = false, 
        invalidValueMessage = "Could not find contact name \"{0}\" in the repository." 
    )

    ValueProperty PROP_NAME = new ValueProperty( TYPE, "Name" );

    Value<String> getName();
    void setName( String name );


It would show '<name> (<category>)' in the selection input field and dialog.

What do you think about it?

Andreas
Re: Label on @PossibleValues [message #1228167 is a reply to message #1227703] Mon, 06 January 2014 10:10 Go to previous messageGo to next message
Eclipse UserFriend
You can implement ValueLabelService to get the desired effect.
Re: Label on @PossibleValues [message #1229187 is a reply to message #1228167] Wed, 08 January 2014 17:25 Go to previous message
Eclipse UserFriend
Yup that works. Thank you. Still in learning mode Smile
Previous Topic:Sapphire 0.8 is now Sapphire 8
Next Topic:Approach for Attaching/Detaching Listeners
Goto Forum:
  


Current Time: Mon May 19 11:52:11 EDT 2025

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

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

Back to the top