Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] ElementProperty rendering

I've opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=353638 to track this issue. Thanks!


From: Konstantin Komissarchik
Sent: Tuesday, August 02, 2011 12:02 PM
To: Sapphire project
Subject: Re: [sapphire-dev] ElementProperty rendering

The approach of varying the emphasis of element removal option based on @Required sounds reasonable. Go ahead and write this up as an enhancement request. This should also be reconciled with the way that enum value property editor presents null.

 

- Konstantin

 

 

From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Shenxue Zhou
Sent: Tuesday, August 02, 2011 9:57 AM
To: Sapphire project
Subject: Re: [sapphire-dev] ElementProperty rendering

 

The following are two screen shots of Sapphire's rendering of the "Outcome" property:

 

 

 

To a new user, it would appear that he/she has three options for the Outcome field. I understand "None" option serves the purpose of clearing user selection. But Sapphire already provides a way to do that. The red "x" in front of None would turn into a "light bulb"(second image) if "Fixed outcome" or "ToString()" is selected and it'd allow user to clear the selection.

 

My proposal would be for Element property that has "Required" annotation, we don't render "None", but rely on the "light bulb" to clear user selection. When the selection hasn't been made or has been cleared, turn the "light bulb" into red x for validation error.

 

Thanks,

 

Shenxue

 


From: Konstantin Komissarchik
Sent: Monday, August 01, 2011 3:45 PM
To: Sapphire project
Subject: Re: [sapphire-dev] ElementProperty rendering

The “none” option serves the same purpose as being able to clear a text box for a required value property. The end result may or may not be semantically valid (controlled by @Required property), but the intermediary state could be valuable to the user.

 

I do not anticipate allowing individual control over this behavior. Either this rendering is fine or we devise different means of achieving the same result everywhere. If you (or anyone else for that matter) has ideas for a better presentation, go ahead and open an enhancement request. Make sure that the proposed presentation accounts for properties with/without @Required and provides some means of clearing an element property even if it is required.

 

- Konstantin

 

 

From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Shenxue Zhou
Sent: Monday, August 01, 2011 2:33 PM
To: Sapphire project
Subject: [sapphire-dev] ElementProperty rendering

 

I have the following element property:

 

    @Type
    (
        base = IMethodCallOutcome.class,
        possible =
        {
            IFixedOutcome.class,
            IToStringOutcome.class
        }
    )   
    @Label( standard = "outcome" )
    @XmlElementBinding
    (
        path = "outcome",
        mappings =
        {
            @XmlElementBinding.Mapping( element = "fixed-outcome", type = IFixedOutcome.class ),
            @XmlElementBinding.Mapping( element = "to-string", type = IToStringOutcome.class )
        }
    )
    @Required
       
    ElementProperty PROP_OUTCOME = new ElementProperty( TYPE, "Outcome" );
   
    ModelElementHandle<IMethodCallOutcome> getOutcome();

 

When this property is rendered using Sapphire's "with" mechanism, the default style is to use radio buttons. Besides the options for "fixed-outcome" and "to-string" types, Sapphire UI also renders a "None" option. This is somewhat confusing to the users since they might think "None" is a valid option for the outcome property.

 

I wonder whether its feasible to provide Sapphire users to not render the "None" option for the element property?

 

Thanks!

 

Shenxue


Back to the top