use of de.alpharogroup.db.resource.bundles.service.api.BundleNamesService in project bundle-app-ui by astrapi69.
the class NewBundleNamePanel method onSave.
protected void onSave(final ActionEvent e) {
BundleApplications bundleApplication = getModelObject().getBundleApplication();
final BundleNamesService bundleNamesService = SpringApplicationContext.getInstance().getBundleNamesService();
final String baseName = txtBasename.getText();
final LanguageLocales selectedItem = (LanguageLocales) cmbLocale.getSelectedItem();
if (selectedItem != null) {
final Locale locale = LocaleResolver.resolveLocale(selectedItem.getLocale());
bundleNamesService.getOrCreateNewBundleNames(bundleApplication, baseName, locale);
} else {
final LanguageLocales languageLocales = getModelObject().getBundleApplication().getDefaultLocale();
final Locale locale = SpringApplicationContext.getInstance().getLanguageLocalesService().resolveLocale(languageLocales);
bundleNamesService.getOrCreateNewBundleNames(bundleApplication, baseName, locale);
}
}
Aggregations