本文整理汇总了Java中pt.ist.fenixWebFramework.renderers.utils.RenderUtils.getResourceString方法的典型用法代码示例。如果您正苦于以下问题:Java RenderUtils.getResourceString方法的具体用法?Java RenderUtils.getResourceString怎么用?Java RenderUtils.getResourceString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pt.ist.fenixWebFramework.renderers.utils.RenderUtils
的用法示例。
在下文中一共展示了RenderUtils.getResourceString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getErrorMessage
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
public String getErrorMessage() {
if (!isNumber) {
return RenderUtils.getResourceString("renderers.validator.number");
}
if (lowerBound != null && upperBound != null) {
return RenderUtils.getFormatedResourceString("renderers.validator.number.range.both", lowerBound, upperBound);
}
if (lowerBound != null) {
return RenderUtils.getFormatedResourceString("renderers.validator.number.range.lower", lowerBound);
}
return RenderUtils.getFormatedResourceString("renderers.validator.number.range.upper", upperBound);
}
示例2: getLinkText
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public String getLinkText(TableLink tableLink, Object object) {
String text = tableLink.getText();
if (text != null) {
return text;
}
String key = tableLink.getKey();
String bundle = tableLink.getBundle();
if (key == null) {
return tableLink.getName();
}
text = RenderUtils.getResourceString(bundle, key);
if (text == null) {
text = tableLink.getName();
}
return getCounter() != null ? text + RenderUtils.getFormattedProperties(getCounter(), object) : text;
}
示例3: getOwnTag
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
public HtmlTag getOwnTag(PageContext context) {
HtmlTag tag = super.getOwnTag(context);
tag.setName(null);
HtmlTag scriptTagInit = scriptTag("initEditor();");
HtmlTag scriptTagWrite =
scriptTag("writeRichText('" + getName() + "', '" + (getValue() == null ? "" : getValue().trim()) + "', "
+ getWidth() + ", " + getHeigth() + ", true, false);" + "\n//-->");
HtmlTag noscriptTag = new HtmlTag("noscript", RenderUtils.getResourceString("javascript.notSupported"));
if (noscriptTag.getText() == null) {
noscriptTag.setText("");
}
tag.addChild(noscriptTag);
tag.addChild(scriptTagInit);
tag.addChild(scriptTagWrite);
return tag;
}
示例4: getButtonText
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
private String getButtonText() {
if (isKey()) {
return RenderUtils.getResourceString(getBundle(), getButtonLabel());
} else {
return getButtonLabel();
}
}
示例5: createOtherOption
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
private HtmlMenuOption createOtherOption(HtmlMenu menu) {
String title = RenderUtils.getResourceString("renderers.menu.other.title");
HtmlMenuOption otherOption = menu.createOption(title);
otherOption.setValue(OPTION_KEY);
return otherOption;
}
示例6: createComponent
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
public HtmlComponent createComponent(Object object, Class type) {
Collection collection = (Collection) object;
HtmlComponent component;
if (getEmptyMessageKey() != null && collection.isEmpty() && getPossibleObjects().isEmpty()) {
component = new HtmlText(RenderUtils.getResourceString(getEmptyMessageBundle(), getEmptyMessageKey()));
this.empty = true;
} else {
component = super.createComponent(object, type);
this.empty = false;
}
return component;
}
示例7: getHelpLabel
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
public Optional<String> getHelpLabel(int rowIndex) {
MetaSlot slot = this.object.getSlots().get(rowIndex);
if (!slot.hasHelp()) {
return Optional.empty();
} else {
String value = RenderUtils.getResourceString(slot.getBundle(), slot.getHelpLabel());
return value == null ? Optional.of("!" + slot.getHelpLabel() + "!") : Optional.of(value);
}
}
示例8: getDefaultTitle
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
private String getDefaultTitle() {
if (getDefaultText() == null) {
return RenderUtils.getResourceString("renderers.menu.default.title");
}
if (isKey()) {
return RenderUtils.getResourceString(getBundle(), getDefaultText());
}
return getDefaultText();
}
示例9: getFormatLabel
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
protected String getFormatLabel() {
if (isDateKey()) {
return RenderUtils.getResourceString(getDateBundle(), getDateFormatText());
} else {
if (getDateFormatText() != null) {
return getDateFormatText();
} else {
return getDateFormat();
}
}
}
示例10: getResourceMessage
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
protected String getResourceMessage(String message) {
if (this.arguments == null || this.arguments.length == 0) {
return RenderUtils.getResourceString(getBundle(), message);
} else {
return RenderUtils.getFormatedResourceString(getBundle(), message, this.arguments);
}
}
示例11: getHeaderToolTip
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
private String getHeaderToolTip(final int columnIndex) {
MetaSlot metaSlot = this.metaObjects.get(0).getSlots().get(columnIndex - (isCheckable() ? 1 : 0));
String headerToolTip = metaSlot.getProperties() == null ? "" : metaSlot.getProperties().getProperty("headerToolTip");
if (!Strings.isNullOrEmpty(headerToolTip)) {
return " <a href=\"#\" class=\"help\">[?]<span>"
+ RenderUtils.getResourceString(metaSlot.getBundle(), headerToolTip) + "</span></a>";
}
return "";
}
示例12: getFormatLabel
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
protected String getFormatLabel() {
if (isKey()) {
return RenderUtils.getResourceString(getBundle(), getFormatText());
} else if (getFormatText() != null) {
return getFormatText();
}
return "";
}
示例13: getDefaultTitle
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
private String getDefaultTitle() {
if (getDefaultText() == null) {
return RenderUtils.getResourceString("renderers.menu.default.title");
} else {
if (isKey()) {
return RenderUtils.getResourceString(getDefaultTextBundle(), getDefaultText());
} else {
return getDefaultText();
}
}
}
示例14: getFormatLabel
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
protected String getFormatLabel() {
if (isKey()) {
return RenderUtils.getResourceString(getBundle(), getFormatText());
} else {
if (getFormatText() != null) {
return getFormatText();
} else {
return getFormat();
}
}
}
示例15: getTitle
import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
public String getTitle() {
String label = null;
String key = getDescription();
if (key != null) {
label = RenderUtils.getResourceString(bundle, key);
}
if (label != null) {
return label;
}
String labelFormat = getDescriptionFormat();
final Object object = getMetaObject().getObject();
if (object != null && labelFormat != null) {
return RenderUtils.getFormattedProperties(labelFormat, object);
}
Class type;
if (getMetaObject().getSchema() != null) {
type = getMetaObject().getSchema().getType();
} else {
type = getMetaObject().getType();
}
return RenderUtils.getSlotLabel(type, getName(), getBundle(), getDescription());
}