Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sapphire-dev] New topic in forum Sapphire, called Label on @PossibleValues, by Andreas Weise

Title: Eclipse Community Forums
Subject: Label on @PossibleValues Author: Andreas Weise Date: Sun, 05 January 2014 04:39
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
[ Reply ][ Quote ][ View Topic/Message ][ Unsubscribe from this forum ]

Back to the top