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

minor
#25937
Include logback in TL Studio

defect

major
#25998
TL-Script context help broken
minor
#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
defect

minor

#26040

Partially no label for custom model type

InAppDevelopmentLayoutFramework

If you create a new type `A` without a supertype and give it a `name` attribute, instances of this type are represented in some places by the value in their `name` attribute (e.g., in references that point to type `A`). In other places, the display is `AttributedWrapper(type:my.app:A, id: GenericObject:3848, name: A3)`, for example, in the title of the context menu for an object of type A and in tooltips.

  • Interestingly, 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, inconsistent `ResourceProvider ` and `LabelProvider` instances are registered for the newly created type. The reference display uses the `tl:ResourceProvider`, whereas 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 domain object for which a label is requested must be a new object from a grid.

A Grid New Object is treated as a (transient) domain object, but it does indeed have a model type (the type that is currently being instantiated). In this case, the type of the Grid New Object is the newly created model type 'A' (see test case description). No configured label provider is defined for this model type. Therefore, the search for a label provider falls back on the Java class hierarchy. However, no label provider is found there either, since a label provider is only stored for `com.top_logic.knowledge.wrap.AbstractWrapper `, and the Grid-New-Object does not derive from `AbstractWrapper`. Consequently, the ` DefaultLabelProvider` is found and subsequently registered in the cache for the newly created model type. If a real object of type `A` is then to be rendered, the `DefaultLabelProvider` is found in the cache. If a LabelProvider for a real `A` object had been requested first , the LabelProvider registered for `AbstractWrapper —"com.top_logic.knowledge.gui.WrapperResourceProvider" —would have been found via the Java class hierarchy.

Test

Note: This problem only occurs if you strictly follow this sequence:

  • Create a new app.
  • Define a new type A.
  • Assign a name attribute (` name `) to the type.
  • Switch to the instances view for A.
  • Create a new row in the grid; do not save or apply it.
  • Display the context menu for the new row.
  • Fill in the values and save.
  • Give the demo type a reference to itself.
  • Create two instances, a1 and a2, of A.
  • Havea1 reference a2.
  • Display the tooltip for 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