Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Refresh displaytext on SmartField
Refresh displaytext on SmartField [message #1797463] Wed, 31 October 2018 09:27 Go to next message
Mario Wymann is currently offline Mario WymannFriend
Messages: 1
Registered: October 2018
Junior Member

I have a SmartField with a list of companies.
I want to refresh the displaytext(Name of the company) of this SmartField and I achieved this using the following code:


However, I expected that the following code would do the same and is cleaner:

Is this a bug or is there a better workaround?

Thank you!
Re: Refresh displaytext on SmartField [message #1797605 is a reply to message #1797463] Fri, 02 November 2018 16:08 Go to previous message
Patrick Bänziger is currently offline Patrick BänzigerFriend
Messages: 91
Registered: September 2011
Hi Mario

I expect that what you want to achieve is to reload the display text because it changed on the database (while the key remained the same), after the smartfield loaded it.

The refreshDisplayText method is typically used in combination with formatting (execFormatValue or similar methods) and you have to switch how the value is displayed.
Example: NumberFields call this method when the you change the property of how many zeros after the decimal point should be displayed, which then reformats the value.

A SmartField uses a LookupCall or a CodeType to provide it with a value and display text. Calling refreshDisplayText will not change anything, because the display text is precomputed and the method's implementation is empty.
It's debatable whether it should - but that would require some discussion among other committers :)

For now, there is no better workaround that I know of that what you already use.
Previous Topic:How to Show / Hide Outlines depending on User Session
Next Topic:AbstractMobileStandaloneRwtEnvironment cannot be resolved to a type
Goto Forum:

Current Time: Mon Feb 24 00:42:51 GMT 2020

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

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

Back to the top