disabling the formatting of values from a ValueLabelService [message #811852] |
Fri, 02 March 2012 22:43 |
Eclipse User |
|
|
|
Is there a way to disable the formatting applied to the values returned from a ValueLabelService? I see that the values are passed to a transform method of a localization service. The transform method is passed an argument to capitalize the first word in the label (following UI standards).
I'm using a ValueLabelService to provide values that replace/hide the actual value of a property which is not suitable for displaying to the user. The labels come from the user data and it would be great to render them as is rather than have the transform applied.
Is there a way to disable the formatting? Or can I add a localization service to the property in the same way that the ValueLabelService is added, then implement a transform() method that is a no-op and returns the value as is?
Thanks,
Carlin
|
|
|
|
Re: disabling the formatting of values from a ValueLabelService [message #813994 is a reply to message #813852] |
Mon, 05 March 2012 23:08 |
Eclipse User |
|
|
|
I have a property on a Sapphire IModelElement that can only contain values that come from a non-sapphire based object. I've created a PossibleValuesService that provides the finite set of values for the property. The values themselves are really just a fully qualified name to an attribute or method accessor of a bean class. The values have an associated simple name appropriate to display to the user and used elsewhere in our tooling. In this case the simple names begin with lower case characters.
I created a ValueLabelService that returns the associated simple name for the value selected from the PossibleValuesService. We'd like this name to be displayed without the transform to be consistent with how it is displayed in the other areas of our tooling.
|
|
|
|
Powered by
FUDForum. Page generated in 0.01793 seconds