TopLogic - the automated application engine
  • Releases
  • Dokumentation
  • Github
  • Discord
  1. Home
  2. Releases
  3. TL_7.3.0_02
  4. #26040

7.3.0_02
TopLogic Release

2021-06-22

Enhancement

Detail
#25937
Include logback in TL Studio

Bugfix

Major
#25998
TL-Script context help broken
Detail
#25999
Disappearing toolbar in tile layout
#26007
Unnecessary scrollbar in HTMLTree
#26019
Buttons in filter dialogs disappeared
#26039
Gridcomponent: Display of context menu for new (transient) row object leads to UnsupportedOperationException
#26040
Partially no label for custom model type
#26041
In the context menu for a new grid line the command "Delete" is offered, crash on selection
#26042
Calendar control in filter dialogs does not work in Modern theme
Bugfix

Detail

#26040

Partially no label for custom model type

InAppDevelopmentLabelProvider

If one creates a new type A` without a supertype, gives it an attribute `name, instances of this type are displayed in some places via the value in their name attribute (e.g. in references pointing to type A`). In other places you get the display `AttributedWrapper(type:my.app:A, id: GenericObject:3848, name: A3), e.g. in the title of the context menu for an object of type A and in tooltips.

  • Fascinatingly, the problem seems to disappear after restarting the application.
  • The problem also does not seem to occur all the time.

Analysis

When the problem occurs, the newly created type has inconsistent ResourceProviders and LabelProviders registered. The reference display uses the tl:ResourceProvider, but the title display in the context menu and the name display in the tooltip use the LabelProvider.

The problem occurs as follows: After restarting the application, the LabelProviderService caches are empty to the extent that only the directly configured Type->LabelProvider mappings are entered. For the problem to occur, the first compartment object for which a label is requested must be a New-Object of a Grid.

A Grid-New-Object is considered like a (transient) compartment object, but it very well has a model type (the type that is being instantiated). In this case the type of the Grid-New-Object is the just created model type 'A' (see test case description). There is no configured label provider for this model type. Therefore, the search for a label provider falls back to the Java class hierarchy. But also there no label provider is found, because only for com.top_logic.knowledge.wrap.AbstractWrapper a label provider is stored, but the Grid-New-Object does not derive from AbtractWrapper. Therefore, the DefaultLabelProvider is found and then registered in the cache for the newly created model type. If a real object of type A` is to be rendered afterwards, the `DefaultLabelProvider is found in the c ache. If a LabelProvider for a real A` object had been requested first , then the LabelProvider"com.top_logic.knowledge.gui.WrapperResourceProvider" registered for`AbstractWrapper" would have been found via the Java class hierarchy.

Test

Attention: The problem only occurs if you follow the order exactly:

  • Create new app.
  • Define new type A.
  • Give the type a name attribute name.
  • Switch to the instance view for A.
  • Create new row in the grid, do not save or apply.
  • Show context menu for the new row.
  • Fill values and save.
  • Give demo type a reference to itself.
  • Create two instances a1 and a2 of A.
  • Leta1 refer to a2.
  • Display the tooltip of the reference value.
  • Get Started
  • Github
  • Discord
  • Das Unternehmen hinter TopLogic
  • Softwareentwicklung heute
  • Kontakt

© Copyright – Business Operation Systems GmbH

  • top-logic.com
  • Nutzungsbedingungen
  • Impressum
  • Rechtlicher Hinweis
  • Datenschutz
  • DE
  • Login