Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » disabling the formatting of values from a ValueLabelService(Question about how to disable the formatting for the values returned from a ValueLabelService)
disabling the formatting of values from a ValueLabelService [message #811852] Fri, 02 March 2012 22:43 Go to next message
Eclipse UserFriend
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 #813852 is a reply to message #811852] Mon, 05 March 2012 19:40 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I don't believe there is a way to disable/control this behavior at the moment. Of course, we can provide a method, but before we go there...

Could you provide a bit more concrete details? I'd like to understand the scenario a bit better. Currently, if ValueLabelService returns a value different from the input, we apply a transform based on the assumption that what's returned is a human-readable label that needs to be presented appropriately for the context.

- Konstantin

Re: disabling the formatting of values from a ValueLabelService [message #813994 is a reply to message #813852] Mon, 05 March 2012 23:08 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: disabling the formatting of values from a ValueLabelService [message #814148 is a reply to message #813994] Tue, 06 March 2012 04:50 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Ok. Could you capture this in an enhancement request and we can continue in Bugzilla?
Previous Topic:Announcing Sapphire 0.4.1 Release
Next Topic:Refreshing a FunctionResult
Goto Forum:
  


Current Time: Fri Apr 19 02:50:17 GMT 2024

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

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

Back to the top