TopLogic - the automated application engine
  • Releases
  • Dokumentation
  • Github
  • Discord
  1. Home
  2. Releases
  3. TL_7.2.0
  4. #23471

7.2.0
TopLogic Release

2020-07-31

enhancement

critical
#22685
PostgreSQL support
#23383
Form Editor
#23471
Context menu
#23854
Theme editor
#24071
Theme "discreet
#24085
Create new views in the application
#24188
TL Script Editor with Context Help
#24863
Model export to the development environment
#24926
JavaDoc for Top-Logic
#24936
Translation service
major
#23468
Grid: Unification of selection behavior
#23469
File upload via drag&drop directly from the client's file system
#23470
Grid: merging filter and sort buttons in column header
#23681
Tables: Evaluation row
#23912
Control rendering via templates
#23962
XML editor with syntax highlighting
#24044
Replace hardcoded icon references with theme variables
#24122
Create ConfigurationDescriptor from XML file
#24158
Themes export and import
#24255
Allow sending emails that have recipients only in CC or BCC
#24375
Simplify the "Document lock" function.
#24377
Comment field for documents
#24378
Persistence of settings in selection dialogs
#24461
Optimized Jetty Startup in the IDE
#24464
Simplified layout templates with calculated alias variables
#24499
TL script: Count function
#24540
Create values for composite attributes inline
#24620
Migration: Rewriter that transforms attribute with XSL
#24679
Representation of foreign objects in BPE
#24701
Transferring specialist definitions to BPE Ex/Importer
#24728
Optionally inherit type default from attribute annotations
#24729
Set model annotations to table definitions
#24733
Internationalizable log messages
#24757
Typed configuration: allow properties with ValueFormat and ValueBinding simultaneously
#24760
Enter translations for `ResKey`s in declarative forms
#24888
Exact version information on the monitor page
#24905
New login page
#24997
Automatic data migration for newly created tables
minor
#23917
Parameterize renderer
#23919
Generalize Config Item Templates to Rendering Templates
#23969
LockStrategy for Interfaces
#23970
BreadcrumbComponent
#23973
Upload binary data in declarative forms
#24024
Theme configurations in a separate file
#24167
Dialog for creating multiple ConfigurationItems
#24196
Update Jetty to 9.4.22
#24200
Use model factory with default name without factory annotation
#24210
Upload option of fonts in theme editor
#24318
GUI assertion FormField#isMandatory()
#24319
Configurative "Mandatory" Override for Properties in Declarative Forms
#24367
Typed configuration: serialize BinaryData properties by default
#24373
Script recorder - export/import of templates
#24374
Script Recorder: Make "Select Server Script" hideable.
#24376
Make TLKafkaProducer extensible.
#24407
Layout refactoring: restructure (admin) layouts so that .layout.xml and component XML are adjacent
#24410
MigrationProcessor for deleting the saved application model
#24419
Multiple inheritance for themes
#24457
External module for PostgreSQL driver
#24492
Using TL Script Editor for Script Attributes and Properties
#24494
Annotate width of text field at model attribute
#24495
Title for table definitions in workflow steps
#24503
Possibility to open an editor in dialogs in edit mode
#24516
Display of non-process attributes
#24521
General layout option: resetInvisible
#24524
No points in environment variables
#24535
GenericObject as default database table
#24537
Service inspection
#24538
remove loginscreen.png in POS
#24548
Configurable exception lists in EditAttributedComponent
#24552
Grid: Deselection with Ctrl-Click
#24561
Automatic text wrapping for long lines for the code editor
#24567
TL-Script expression to evaluate a dynamic attribute
#24569
LabelProvider by expression
#24570
Main properties for MetaAttributes table
#24580
Customization of grid layouts in the Element module
#24581
ShowSystemEnvironment.jsp: Alphabetical sorting.
#24584
Remove hard icon reference in grid.xml
#24588
Use of labels of subject objects in messages
#24590
BPE: Unify task transition error text and condition
#24656
Display of "_self" column in FormEditor table
#24672
Display of a static HTML in the form editor
#24673
Enable "Standard" Links in WYSIWYG Editor
#24692
Migration: Enable version downgrade
#24697
Directory (LDAP) Account Sync without explicit group access
#24703
Scripting: ModelNamingScheme for the selection of selectables
#24715
Dealing with large file sizes during uploads through file drops
#24716
FileDropHandler: Improve error messages
#24718
Improving the completion of a task
#24744
Dynamic dialog titles
#24745
Missing JSP attribute "wholeLine" for basic:fieldset
#24747
Macro as GUI element in the form editor
#24755
Introduce feature sets in StructuredTextConfigService
#24756
Typed configuration: no error when accessing mandatory properties that are not set
#24758
ResKey: Optional key for literal `ResKey`s, better XML format
#24765
com.top_logic.layout.form.template.model.Template for HTML code
#24768
Make FormEditor dialog in a programmatic dialog
#24803
Better positioning of administration components
#24813
Display hidden attributes in shape editor
#24816
MediaQueryControl should be LayoutControlAdapter
#24853
Dynamically adjust the number of lines to the content of the code editor
#24856
Enhanced API for TypedAnnotatable
#24869
Specify a reason if lines cannot be removed
#24873
Typed configuration: use short cut format for item-value properties for serialization
#24884
Update Font Awesome to version 5.13.0
#24895
Focus tables
#24902
PropertyEditor for TLFormDefinition
#24906
FormBuilder for a type using the implicit FormDefinition.
#24913
Offer forms of super types as templates to extend
#24916
Buttons to reset the form
#24925
Provide checkAll to FormContainer
#24928
Be able to prevent recording of all actions in the dialog
#24932
Save layout back to file system
#24982
Assertion on the error text of a FormField
#24999
Treat deploy aspects like "normal" web apps
#25012
Show Teminplan in Tile Demo
#25013
Register WindowComponent to the MainLayout of the opener
#25027
Scripting of creation of new views
#25039
Display of the messages of an exception in the info service
#25040
Better error behavior if layout configuration is invalid
#25041
Declarative configuration shall extend programmatic
#25044
Differentiation between active and disabled buttons in the "modern" header
#25055
BinaryDataFactory: Create BinaryData from InputStream and name
#25067
Info type display without icon and header in info service
#25081
DefaultProvider via expression
#25083
Special group "Other attributes" in the shape editor
nice-to-have
#23964
Abstract base class for ControlProvider for FormMember
#23979
TableData: getOwner() to be included in the API
#24195
ConfigurationItem for internationalized texts without description
#24197
TL-Sync: Set Kafka bootstrap servers via Java property
#24209
Replace hover classes loaded by javascript with hover pseudo classes
#24282
Typed configuration: utility for parsing with custom root tag
#24286
Utility to integrate Maven dependencies into a TL module
#24313
Assertion for selection in TreeTableComponent
#24340
Set default encoding of files in the project
#24485
Dump JSP into the standard maintenance pages
#24504
Remove static SQL statements, instead route dynamically via DBHelper
#24575
Wrapper generation for multiple modules
#24613
Service method for creating a SortConfig
#24750
TL-Script Macros: Allow dynamic content in protected attributes (SafeHTML)

defect

critical
#24984
Incorrect AssociationCache update in commit
major
#24380
Configured resource provider is not found for historical objects
#24452
Possible infinite loop in AbstractKBCache
#24695
Structure editor: Different line height Flex vs Fix
#24721
Tree table renders checkboxes for all nodes
#24854
Incorrect dialog name in POSDelegateStructureHTMLTree
#24977
User can no longer create bookmark links
minor
#23952
Mandatory attributes cannot be (temporarily) set to zero
#23955
Order of buttons in *SelectorContext not consistent with the rest
#23997
Session service logs only the Apache facade address
#24152
Burger menu rendering error
#24169
Removal of unnecessary inline styles
#24241
Add missing ThemeVariables
#24302
RiskItemFactory: Switch to typed configuration
#24346
Typed configuration: U.u. Incorrect "Outer" reference resolution
#24359
Time-dependent test in Project Demo
#24397
The callback URL configuration of the Pac4jConfigFactory does not serve as a fallback for the client configuration
#24412
Tooltips of non-executable commands in the burger menu are not displayed
#24490
Missing authorization for new workflow version
#24505
Saving script templates in the Script Recorder not possible
#24514
TLScript code completion plugin does not work in Internet Explorer
#24551
GUI Inspector dialog no longer opens for buttons
#24553
Table text filter count empty entries
#24558
Incorrect export/import of ScriptRecorderTemplates
#24619
Migration: Model update may delete attributes if their type changes
#24644
Upload of a document version via drag & drop without lock not possible
#24648
TL Script Editor: code block in the description of a completion not on one line in IE
#24669
Font Awesome is missing from the third-party libraries table
#24677
Unwanted margin in the Gantt page bar
#24680
Tree-Table: Selection is lost when collapsed
#24684
Swap order jsDiagram / Themes Modern in CP
#24696
Advanced search form for wide
#24698
Unwanted line break when displaying a URL
#24704
Inactive create button of a grid is too bright in sidebar theme
#24759
Change log configuration in the application no longer possible
#24764
LabelProvider for BinaryData objects
#24769
More errors in reactive forms
#24775
FileDropHandler: waitPane sometimes does not disappear
#24785
Maxmiert property with dialogs is lost
#24862
Incorrect filtering in tree tables with non-existing attributes
#24872
Update problem company detail view
#24901
Warnings in the log for layout files
#24917
Use `config-type` configured on attributes for ColumnConfiguration
#24939
Check-Changed on selection in BPMN diagram
#24950
Label column in token table does not exist
#24959
Webfolder is rendered too small
#24965
Committee tests fail if they are executed at certain times of the day
#24974
TopLogicServlet must not redirect to login in case of errors
#24987
Erroneous update of KBCache's
#24988
New document description is not displayed in other WebFolder views
#25005
Double button in the sidebar
#25007
Changes to the edited BPMN diagram can be lost
#25009
Wrong model update when switching to edit mode
#25010
BPE Process Editor does not save "Automatic" setting for branches correctly
#25014
ModuleLayout does not resolve workspace directory properly
#25028
Dialogs of external windows are displayed in the main window
#25048
ThemeVariables of the layout are not resolved correctly
#25056
Too many buttons in sidebar layout
#25059
NullPointer during drag'n'drop of selected ApplicationAction
#25061
ReplayHistory does not find its control on fast PageReload
nice-to-have
#24647
Unnecessary import in SubtypesProvider

administration

minor
#25036
Optimization Memory Virtual Machines
enhancement (User-visible)

critical

#23471

Context menu

LayoutFrameworkMigration

In applications, a context menu should generally be available that, on the one hand, always displays certain standard commands (Edit, Delete, ...) always appear, but also existing application-specific functionalities that are available for the currently selected object—either globally within the application or specifically within individual views.

The application developer should be able to decide which of the entries are enabled or disabled for a specific object (via code, for example, based on an attribute value of the object). The enabled/disabled status must be the same as that for the corresponding command in the toolbar, button row, or burger menu.

User Interface

The context menu should be accessible via the right mouse button on one hand, and via other methods for touch devices on the other.

Functionality

Standard functionalities should always appear in the context menu, but it must be possible to disable them on a view-specific basis within the application (e.g., Delete, Edit).

Additional features should be able to be added by applications on a type-specific basis and should then be available in all views of the application for objects of that type (e.g., “Rename,” “Send (Email)”).

Applications should be able to add additional features on a type- and view-specific basis, and these features should then be available in the respective view of the application for objects of that type.

Configurability

It should be possible for the application developer to configure existing commands in the burger menu, button bar, and toolbar to appear in the context menu.

The application developer must generally be able to decide which of the entries for a specific object should be enabled or disabled (via code, for example, depending on an attribute value of the object). The enabled/disabled status must always match that of the corresponding command in the icon bar or the burger menu.

Implementation

See TL/ContextMenu

Code Migration

  • Commands that have an icon, were previously displayed in the toolbar, and now also appear in the context menu must be checked to ensure they work on both backgrounds. It may be necessary to use an icon font icon instead, which can adapt to its background color. This was done for the Edit/Save/Cancel icons.
  • All methods in BoundChecker must receive the object to be checked as an argument and must not implicitly include the current model (e.g., the component)
    • BoundChecker.hideReason(Object)
    • getCurrentObject(BoundCommandGroup, Object)
  • Methods on BoundChecker that do not receive a current object as an argument may only be called on BoundCheckerComponent and must not be included in the permission check for commands (only in display checks, e.g., after a tab switch)
    • allow(BoundCommandGroup)
    • allow(BoundCommand)
  • Commands that do not require the current component model (e.g., "Refresh") must be configured with `null()` as the `target ` so that they are not included in the context menu of elements in parent components. This configuration can be set either via the target="null()" setting when configuring the command or as a default annotation in the command implementation:
#!java 
public class InvalidateCommand extends AJAXCommandHandler {

   public interface Config extends AJAXCommandHandler.Config {
      @Override
      @FormattedDefault(TARGET_NULL)
      ModelSpec getTarget();
   }

   ...
}
  • Dialog openers that use the option ` targetComponent="..." ` must also be configured with ` target="model(self())"`. Since most dialogs do not have their model explicitly set upon opening, but instead receive the model "behind the scenes" from their dialogParent(), the default setting for `target` in ` OpenModalDialogCommandHandler ` has changed from `model(self())` to ` null()`. As a result, dialog openers that do not work with a model other than the one currently set in the parent component will not be included in the context menu of parent components, e.g.:
#!patch
Index: webapp/WEB-INF/layouts/history/historyDialog.xml
===================================================================
--- webapp/WEB-INF/layouts/history/historyDialog.xml   (revision 278883)
+++ webapp/WEB-INF/layouts/history/historyDialog.xml   (working copy)
@@ -43,6 +43,7 @@
        clique="history"
        group="${openerCommandGroup}"
        resourceKey="${defaultI18n}"
+       target="model(self())"
        targetComponent="${namePrefix}Table"
     >${executability}</open-handler>
  </dialogInfo>
  • If a dialog is no longer displayed, or if the opener has the wrong executability, this may be due to a change in the default value for ` target` of the ` OpenModalDialogCommandHandler `. This is the case, for example, if an executability rule has been configured on the open handler that refers to the handler’s target model, even though the opened dialog does not use the handler’s target model at all, but instead obtains its model "behind the scenes" from its dialog parent. In this case, the dialog must be modified so that its model is set via `targetComponent="..."` on the open handler, and the `target` configuration is set as described in the previous point, e.g.:
#!patch
Index: webapp/WEB-INF/layouts/com.top_logic.contact/admin/orgUnits/EditOrgUnit_shared.xml
===================================================================
--- webapp/WEB-INF/layouts/com.top_logic.contact/admin/orgUnits/EditOrgUnit_shared.xml   (revision 278881)
+++ webapp/WEB-INF/layouts/com.top_logic.contact/admin/orgUnits/EditOrgUnit_shared.xml   (working copy)
@@ -56,17 +56,23 @@
     <include name="/element/createStructuredElement.xml"
        detailComponent="${createComponent}"
        jSPNewPage="${createJSP}"
+       model="null()"
        namePrefix="${namePrefix}OrgUnit"
     >
        <inject>
           <dialogInfo
-             defaultI18n="layouts.contact.EditOrgUnit_Shared.newOrgUnit"
-             executability="CreateElementRule"
              height="250"
-             openerClique="create"
-             openerCommandGroup="Create"
              width="450"
-          />
+          >
+             <open-handler id="displayDialog_${namePrefix}OrgUnitnewElementDialog"
+                clique="create"
+                executability="CreateElementRule"
+                group="Create"
+                resourceKey="layouts.contact.EditOrgUnit_Shared.newOrgUnit"
+                target="model(self())"
+                targetComponent="${namePrefix}OrgUnitnewElementDialog"
+             />
+          </dialogInfo>
        </inject>
     </include>
  </dialogs>

Open Issues

  • Context Menu for Tree Components and Tree Controls
  • Context menu for table components and table controls
  • Context menu for tree-table components
  • Context menu for all component backgrounds
  • Context menu for inline objects ("Resource Renderer")
  • Context menu for charts
    • Not included in this ticket.
  • Type-specific context menu entries
  • Does the Resource Provider provide a context menu?
    • No: There is an additional interface, ` ContextMenuCommandsProvider`, which can be used to provide context menu commands for an object. A configured variant of this is the ` LabelProviderService`.
  • Collapse form groups via the context menu
    • No: Too much context menu space is reserved for too little functionality.
  • Context menu for form fields
  • Header for context menus
  • The context menu opens directly at the mouse position, regardless of whether the entire menu can actually be displayed at that position. Instead, the menu must be displayed in a way that fits on the screen—just like the filter popups, for example.
    • See #24641.

Review

  • If a context menu is already open and you right-click on another element, the first context menu should close and a new one should open. Currently, the context menu remains open, and the browser context menu opens as well. I find this confusing. This usually happens when I accidentally click the wrong element and want to open the context menu on a different one.
    • If you right-click on the background while a context menu is open, the original context menu closes instead of opening the browser context menu. Unfortunately, in this situation, you can’t open the context menu for the new target directly, because the click doesn’t hit that target but instead hits a transparent pane that covers the entire window.
  • When you click on an object with a long name, the context menu becomes as wide as the name. However, in some applications, the customer has very long names for their business objects. Therefore, the width of the context menu should be limited.
    • The title never becomes wider than the menu’s content.
  • The width of the context menu behaves strangely: When clicking on the root object in the demo type tree, the text “Create Node” wraps. Presumably because the context menu is too narrow. But when I display the I18N keys, it appears much wider without the text wrapping.
    • Menu entries no longer wrap.
  • If you open the GUI Inspector via the context menu and click slightly outside the context menu, the cursor changes to the waiting cursor. It takes a while to realize that nothing is happening and that the waiting cursor is always displayed outside the context menu. This is annoying, but on the other hand, it only affects us. Is there still a way to improve this? For example, by making sure that inspection works there as well. Or by having the cursor change to “not possible” when inspecting outside the context menu.
    • This is no different from previous burger menus. The cursor can’t be context-sensitive because a panel covers the entire content during inspection.
  • In the grid, I can switch to edit mode via the context menu for each row. But I can’t use options like Cancel, Save, etc., there. Those options are only available when I click on the table header. That seems inconsistent. Can you add that feature?
    • In the grid, you can edit all rows via the context menu, but of course you can only save/apply/cancel the one you’re currently editing—that’s the difference. It’s now implemented exactly so that you only see Save/Apply/Cancel in the context menu of the object or row you’re currently editing. This applies not only to the grid but also to trees with a detail view (at least when “Edit” appears in the tree’s context menu, e.g., in Structures:Aspect Inheritance).
  • In the demo table views “Frozen,” “Configured Sidebar,” and “Tree-Based Table,” I can’t open the component’s context menu. I can only open it for individual rows. Is this intentional?
    • The context menu for these views has no entries. The table configuration commands do not appear in the context menu. This would certainly be desirable, but it is technically difficult to implement.
  • In the toolbars, I can’t open the context menu for their components.
    • Yes, it’s technically difficult.
  • If you parameterize the context menu providers with the component type, the specific derivations wouldn’t have to cast the component every time.
    • If you did that (parameterize`com.top_logic.layout.basic.contextmenu.component.ContextMenuFactory `), you would no longer be able to call the method (without an unchecked cast).
  • In ` ComponentContextMenuFactory.Provider.createButtons(...)`, additional objects are added to a list. This list comes from `super.createButtons(...)`. The problem: `super ` provides no guarantees as to whether the list is mutable or even resizable. The list is created there using ` createProviderButtons(...)`. This, in turn, calls `toButtons(...) `. And that uses `Collectors.toList(...)`. And that states: “There are no guarantees on the type, **mutability**, serializability, or thread safety of the returned List; if more control over the returned List is required, use toCollection(Supplier).” In the Java version I’m using, ArrayList::new is used there, which makes it work. But you should generally be cautious with lists that come from elsewhere.
    • Ack.
  • You can make `TypeBasedContextMenuFactory.Provider._component ` final.
    • Okay.
  • TypeBasedContextMenuFactory.Config: The properties are missing the constants for their @Name.
    • Done.
  • ContextMenuCommandsProvider: This interface has two methods: hasContextMenuCommands and getContextCommands. For the first one, you can specify a trivial default implementation: !getContextCommands(...).isEmpty(). Then it would be a functional interface and could be implemented using a lambda expression. So far, you’ve always needed a new class for this. Even if it’s anonymous, that’s many more lines than a lambda expression. And where optimization is possible, this method can still be implemented.
    • The interface has two methods precisely because one is called extremely frequently and therefore needs to be fast, while the other can be computationally expensive. Therefore, the trivial default implementation is counterproductive. This is also stated (perhaps too politely) in the documentation: “Can be used for optimizing the decision as to whether a context menu should be offered.”
  • ConfiguredContextMenuCommandsProvider: You can make the instance variables final. The @Name annotation is missing for the property override. For ` entries`, a constant is missing for the value of the @Name annotation.
    • Done.
  • GridContextMenuFactory.Provider.acceptComponentCommand(...) The method is overridden, but it only calls ` super`.
    • Removed.
  • GridTableConfig: The JavaDoc states: "TabConfig with defaults for GridComponent." I'm sure you meant TableConfig instead of TabConfig.
  • There are now two TestLabelProviderService classes. Both were introduced this year. One under #24380 in com.top_logic.element, and one under #24501 in com.top_logic.
    • This is intentional, because model references can only be tested in tl-element.
  • You can mark the following instance variables as final:
    • ContextCommandsControl._contextMenu and _titleProvider
    • ContextMenuControl._contextMenu
    • AbstractMenuContents._contents
    • Done.

Test

Trees

Tables

Grids

Component Commands

Inline Objects

Form Fields
  • For form fields, see Technical Demo:Layout Framework#1:Forms:Form Controls (inline); the ` textInputWithContextMenu ` field has a context menu that inserts predefined values into the field.
  • 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