use of org.jowidgets.i18n.api.IMessage in project jo-client-platform by jo-source.
the class MoveOrderedBeanActionBuilderImpl method setDefaultUpText.
private void setDefaultUpText() {
final String entityLabel = getEntityLabel();
if (EmptyCheck.isEmpty(entityLabel)) {
executorActionBuilder.setText(Messages.getMessage("MoveOrderedBeanActionBuilder.move_up_label").get());
} else {
final IMessage message = Messages.getMessage("MoveOrderedBeanActionBuilder.move_up_label_entity");
executorActionBuilder.setText(MessageReplacer.replace(message, entityLabel));
}
}
use of org.jowidgets.i18n.api.IMessage in project jo-client-platform by jo-source.
the class MoveOrderedBeanActionBuilderImpl method setDefaultDownText.
private void setDefaultDownText() {
final String entityLabel = getEntityLabel();
if (EmptyCheck.isEmpty(entityLabel)) {
executorActionBuilder.setText(Messages.getMessage("MoveOrderedBeanActionBuilder.move_down_label").get());
} else {
final IMessage message = Messages.getMessage("MoveOrderedBeanActionBuilder.move_down_label_entity");
executorActionBuilder.setText(MessageReplacer.replace(message, entityLabel));
}
}
use of org.jowidgets.i18n.api.IMessage in project jo-client-platform by jo-source.
the class MoveOrderedBeanActionBuilderImpl method setEntityLabels.
@Override
public IMoveOrderedBeanActionBuilder<BEAN_TYPE> setEntityLabels(final Object entityId) {
checkExhausted();
if (entityId != null) {
final IEntityService entityService = ServiceProvider.getService(IEntityService.ID);
if (entityService != null) {
final IBeanDtoDescriptor descriptor = entityService.getDescriptor(entityId);
if (descriptor != null) {
final IMessage labelSingular = descriptor.getLabelSingular();
if (labelSingular != null && !EmptyCheck.isEmpty(labelSingular.get())) {
setEntityLabelSingular(labelSingular.get());
}
final IMessage labelPlural = descriptor.getLabelPlural();
if (labelPlural != null && !EmptyCheck.isEmpty(labelPlural.get())) {
setEntityLabelPlural(labelPlural.get());
}
}
}
}
return this;
}
Aggregations