@Override public String getCaption() { return messages.getMainMessage("actions.Ok"); } });
/** * @param temporalType a temporal type * @return default date format string for passed temporal type */ public String getDefaultDateFormat(TemporalType temporalType) { return temporalType == TemporalType.DATE ? messages.getMainMessage("dateFormat") : messages.getMainMessage("dateTimeFormat"); } }
@Override public String getCaption() { return messages.getMainMessage("action.switch"); } },
@Inject protected void setMessages(Messages messages) { this.messages = messages; this.caption = messages.getMainMessage("actions.BulkEdit"); }
/** * Provides confirmation dialog title. * @return localized title */ public String getConfirmationTitle() { if (confirmationTitle != null) return confirmationTitle; else { Messages messages = AppBeans.get(Messages.NAME); return messages.getMainMessage("dialogs.Confirmation"); } }
@Override public String getCaption() { Messages messages = AppBeans.get(Messages.NAME); return messages.getMainMessage(name); }
@Inject public void setMessages(Messages messages) { this.messages = messages; component.setClearButtonCaption(messages.getMainMessage("FileUploadField.clearButtonCaption")); component.setFileNotSelectedMessage(messages.getMainMessage("FileUploadField.fileNotSelected")); }
protected void showUnhandledExceptionOnLogin(@SuppressWarnings("unused") Exception e) { String title = messages.getMainMessage("loginWindow.loginFailed", app.getLocale()); String message = messages.getMainMessage("loginWindow.pleaseContactAdministrator", app.getLocale()); showNotification(title, message, NotificationType.ERROR); }
public DynamicAttributesConditionCreator(String filterComponentName, com.haulmont.chile.core.model.MetaClass metaClass, String propertyPath, String entityAlias) { super(RandomStringUtils.randomAlphabetic(10), filterComponentName, metaClass, entityAlias); this.propertyPath = propertyPath; Messages messages = AppBeans.get(Messages.NAME); locCaption = messages.getMainMessage("filter.dynamicAttributeConditionCreator"); showImmediately = true; }
protected void setupSerialChartDefaults(AbstractSerialChart chart) { chart.setDataDateFormat(ChartJsonSerializationContext.DEFAULT_JS_DATE_FORMAT); String format = messages.getMainMessage("amcharts.serialChart.balloonDateFormat"); chart.setBalloonDateFormat(format); }
@MetaProperty public String getDatatypeCaption() { Messages messages = AppBeans.get(Messages.NAME); return messages.getMainMessage("Datatype." + datatype); } }
protected void initLogoImage() { String loginLogoImagePath = messages.getMainMessage("loginWindow.logoImage", app.getLocale()); if (StringUtils.isBlank(loginLogoImagePath) || "loginWindow.logoImage".equals(loginLogoImagePath)) { logoImage.setVisible(false); } else { logoImage.setSource(ThemeResource.class).setPath(loginLogoImagePath); } }
protected String getWarningMessage(User user) { if (user == null) return messages.getMainMessage("warning.userNotFound"); return messages.formatMainMessage( "warning.msg", StringUtils.isBlank(user.getName()) ? user.getLogin() : user.getName() ); }
@Override public void refreshState() { if (target != null) { CollectionDatasource ds = target.getDatasource(); if (ds != null && !captionInitialized) { setCaption(messages.getMainMessage("actions.Edit")); } } super.refreshState(); }
protected void showLoginException(String message) { String title = messages.getMainMessage("loginWindow.loginFailed", app.getLocale()); showNotification(title, message, NotificationType.ERROR); if (loginByRememberMe) { loginByRememberMe = false; loginField.removeValueChangeListener(loginChangeListener); passwordField.removeValueChangeListener(loginChangeListener); } }
public PaletteButton createGridLayoutButton() { PaletteButton button = createCommonButton(); button.setCaption(messages.getMainMessage("gridLayout")); button.setIconFromSet(DashboardIcon.GRID_LAYOUT_ICON); button.setLayout(metadata.create(GridLayout.class)); button.getLayout().setUuid(null); button.setDescription(messages.getMainMessage("gridLayout")); return button; }
protected void initTimeZoneColumn() { usersTable.addGeneratedColumn("timeZone", entity -> { Label<String> label = uiComponents.create(Label.TYPE_DEFAULT); if (Boolean.TRUE.equals(entity.getTimeZoneAuto())) { label.setValue(messages.getMainMessage("timeZone.auto")); } else if (entity.getTimeZone() != null) { label.setValue(entity.getTimeZone()); } return label; }); }
@Override protected void initComponent(CubaPickerField<V> component) { Messages messages = beanLocator.get(Messages.NAME); setInputPrompt(messages.getMainMessage("searchPickerField.inputPrompt")); getComponent().setItemCaptionGenerator(this::generateItemCaption); getComponent().setFilterHandler(this::executeSearch); }
@Override public Field createField(ReportInputParameter parameter) { DateField dateField = componentsFactory.createComponent(DateField.class); dateField.setResolution(DateField.Resolution.MIN); dateField.setDateFormat(messages.getMainMessage("dateTimeFormat")); if (BooleanUtils.isTrue(parameter.getDefaultDateIsCurrent())) { setCurrentDateAsNow(parameter, dateField); } return dateField; } }
protected Component createTimeField(Class javaClass, final ValueProperty valueProperty) { TimeField<Object> timeField = componentsFactory.createComponent(TimeField.NAME); timeField.setDatatype(datatypeRegistry.get(javaClass)); String formatStr = messages.getMainMessage("timeFormat"); timeField.setFormat(formatStr); timeField.addValueChangeListener(e -> _setValue(e.getValue(), valueProperty)); timeField.setValue(_getValue(valueProperty)); timeField.setWidth(theme.get("cuba.gui.filter.Param.timeComponent.width")); return timeField; }