use of io.jmix.ui.xml.PropertyShortcutLoader in project jmix by jmix-framework.
the class AbstractComponentLoader method loadShortcutFromAlias.
@Nullable
protected String loadShortcutFromAlias(String shortcut) {
if (shortcut.endsWith("_SHORTCUT}")) {
PropertyShortcutLoader propertyShortcutLoader = applicationContext.getBean(PropertyShortcutLoader.class);
String alias = shortcut.substring(2, shortcut.length() - 1);
if (propertyShortcutLoader.contains(alias)) {
return propertyShortcutLoader.getShortcut(alias);
} else {
String message = String.format("An error occurred while loading shortcut. " + "Can't find shortcut for alias \"%s\"", alias);
throw new GuiDevelopmentException(message, context);
}
}
return null;
}
Aggregations