Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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