public static Map<BundleItem, Collection<WidgetItem>> loadAvailableWidgets(Application application) throws ClassNotFoundException { ProcessToolRegistry reg = GenericEditorApplication.getRegistry(); I18NSource i18NSource = I18NSource.ThreadUtil.getThreadI18nSource();
public static String getLocalizedMessage(String key) { return I18NSource.ThreadUtil.getLocalizedMessage( (key.startsWith("processdata") ? "" : "widget.process_data_block.editor.") + key); }
@Override public void onRequestEnd(HttpServletRequest request, HttpServletResponse response) { ProcessToolContext.Util.removeThreadProcessToolContext(); I18NSource.ThreadUtil.removeThreadI18nSource(); current.remove(); }
public void loadWidget(final WidgetItemInStep widget, boolean reloadProperties) { this.widget = widget; I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); removeAllComponents(); setStyleName(Reindeer.PANEL_LIGHT);
private ComponentContainer buildLayout() { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); prepareAvailableWidgetsComponent();
@Override public void buttonClick(Button.ClickEvent clickEvent) { final I18NSource i18NSource = I18NSource.ThreadUtil.getThreadI18nSource();
private void initComponent() { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); if (property.getDescription() == null) { field.setDescription(messages.getMessage(
private Map<String,Object> getLoadedJsonData(String jsonConfig) { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); if (StringUtils.isEmpty(jsonConfig)) return new HashMap<String,Object>();
private void initComponent() { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); queueDescriptionField = new TextField(); queueDescriptionField.setWidth("75%");
Object description, Object commentary, Collection<Permission> permissions) { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); TaskConfig tc = new TaskConfig(); tc.setTaskName(stepName);
I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); TaskConfig tc = new TaskConfig(); tc.setTaskName(propertiesPanel.getClassInfo().getAliasName());
current.set(this); I18NSource.ThreadUtil.setThreadI18nSource(I18NSourceFactory.createI18NSource(request.getLocale()));
permissions = getPermissionsFromAnnotation(permissionsUsed, defaultPermissions); I18NSource i18NSource = I18NSource.ThreadUtil.getThreadI18nSource();
I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); VaadinUtility.validationNotification( application,
AutoWiredPropertyConfigurator awpConfigurator = field.getAnnotation(AutoWiredPropertyConfigurator.class); AperteDoc fieldDoc = field.getAnnotation(AperteDoc.class); I18NSource i18NSource = I18NSource.ThreadUtil.getThreadI18nSource();
private void initComponent() { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); setCaption(messages.getMessage("messages.language.new.caption")); languageForm = new LanguageForm(); addButton = VaadinUtility.button( messages.getMessage("messages.language.new.add"), new Runnable() { @Override public void run() { languageForm.commit(); Language lang = languageForm.getLanguage(); if (languageProperties.containsKey(lang)) { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); VaadinUtility.errorNotification( getApplication(), messages, messages.getMessage("messages.language.new.exists") ); return; } addLanguageTab(lang, null); NewLanguageWindow.this.close(); } } ); }
private void loadJSONConfig() { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); try { Map<String, String> map = JSONHandler.loadConfig(stepTreeContainer, rootItem, jsonConfig, permissions); if (stepTree != null) { stepTree.expandItemsRecursively(rootItem); } assigneeField.setValue(map.get(JSONHandler.ASSIGNEE)); swimlaneField.setValue(map.get(JSONHandler.SWIMLANE)); candidateGroupsField.setValue(map.get(JSONHandler.CANDIDATE_GROUPS)); commentaryTextArea.setValue(map.get(JSONHandler.COMMENTARY)); descriptionField.setValue(map.get(JSONHandler.DESCRIPTION)); for (Object widget : stepTreeContainer.getItemIds()) { if (widget != rootItem) { stepTree.getItem(widget).getItemProperty("icon").setValue(getWidgetIcon(((WidgetItemInStep) widget).getWidgetItem())); } } } catch (WidgetNotFoundException e) { logger.log(Level.SEVERE, "Widget not found", e); application.getMainWindow().showNotification(messages.getMessage("error.config_not_loaded.title"), messages.getMessage("error.config_not_loaded.widget_not_found.body", e.getWidgetItemName()), Notification.TYPE_ERROR_MESSAGE); } catch (ParsingFailedException e) { logger.log(Level.SEVERE, "Parsing failed found", e); application.getMainWindow().showNotification( messages.getMessage("error.config_not_loaded.title"), messages.getMessage("error.config_not_loaded.unexpected_error.body", e.getLocalizedMessage()), Notification.TYPE_ERROR_MESSAGE); } }
private void initComponent() { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
private VerticalLayout buildWidgetEditorTabContent() { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); VerticalLayout availableWidgetsLayout = new VerticalLayout(); availableWidgetsLayout.setSpacing(true); availableWidgetsLayout.setWidth("100%"); availableWidgetsLayout.addComponent(availableWidgetsPane); VerticalLayout stepLayout = new VerticalLayout(); stepLayout.setWidth("100%"); stepLayout.setSpacing(true); stepLayout.setMargin(true); stepLayout.addComponent(new Label(messages.getMessage("userstep.editor.widgets.instructions"), Label.CONTENT_XHTML)); stepLayout.addComponent(availableWidgetsLayout); Panel treePanel = new Panel(); treePanel.setStyleName(Reindeer.PANEL_LIGHT); treePanel.addComponent(stepTree); treePanel.setWidth("245px"); HorizontalLayout treeAndParamLayout = new HorizontalLayout(); treeAndParamLayout.setWidth("100%"); treeAndParamLayout.setSpacing(true); treeAndParamLayout.addComponent(treePanel); treeAndParamLayout.addComponent(paramPanel); treeAndParamLayout.setExpandRatio(paramPanel, 1.0f); stepLayout.addComponent(treeAndParamLayout); stepLayout.setExpandRatio(treeAndParamLayout, 1.0f); return stepLayout; }