jmix-projects / jmix-ui

DEPRECATED. Use https://github.com/jmix-framework/jmix
https://www.jmix.io
3 stars 7 forks source link

Ability to define messageGroup declaratively #780

Closed n-13 closed 2 years ago

n-13 commented 2 years ago

When extending some screen messages from original descriptor not shown.

For example we have string "msg://search" at base descriptor io/jmix/auditui/screen/entitylog/entity-log-browser.xml, a message at messages.properties: io.jmix.auditui.screen.entitylog/search=Search and screen descriptor com/example/screen.xml, that extends base descriptor.

Result: wi have "search" sting on screen instead of "Search"

Temporary workaround: XmlInheritanceProcessorFix.txt


Solution

Added the messageGroup attribute to both window and fragment definitions. The value of this attribute (if set) is used as the base message group during the process of XML loading and is set to the instance of the MessageBundle bean associated with the screen.

Note: In case of screen extension, if messageGroup is set as the parent screen group value then messages that are added to the extended screen must have explicit message group.


For QA:

themeSettingsScreen has both XML and programmatic message usage, so it's ideal for testing.

reznikova21 commented 2 years ago

1.2.0-SNAPSHOT - verified