本文整理汇总了Java中org.apache.wicket.feedback.FeedbackMessage.WARNING属性的典型用法代码示例。如果您正苦于以下问题:Java FeedbackMessage.WARNING属性的具体用法?Java FeedbackMessage.WARNING怎么用?Java FeedbackMessage.WARNING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.wicket.feedback.FeedbackMessage
的用法示例。
在下文中一共展示了FeedbackMessage.WARNING属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMessageTooltip
static String createMessageTooltip(final IModel<FeedbackMessage> model) {
FeedbackMessage message = model.getObject();
switch (message.getLevel()) {
case FeedbackMessage.INFO:
return "info";
case FeedbackMessage.SUCCESS:
return "success";
case FeedbackMessage.ERROR:
return "partialError";
case FeedbackMessage.FATAL:
return "fatalError";
case FeedbackMessage.UNDEFINED:
return "undefined";
case FeedbackMessage.DEBUG:
return "debug";
case FeedbackMessage.WARNING:
default:
return "warn";
}
}
示例2: getQualifier
private String getQualifier(int level) {
switch (level) {
case FeedbackMessage.DEBUG:
return DEBUG_CSS_QUALIFIER;
case FeedbackMessage.INFO:
return INFO_CSS_QUALIFIER;
case FeedbackMessage.SUCCESS:
return SUCCESS_CSS_QUALIFIER;
case FeedbackMessage.WARNING:
return WARNING_CSS_QUALIFIER;
case FeedbackMessage.ERROR:
return ERROR_CSS_QUALIFIER;
case FeedbackMessage.FATAL:
return FATAL_CSS_QUALIFIER;
default:
return "";
}
}
示例3: getCSSClass
@Override
protected String getCSSClass(FeedbackMessage message) {
String cssClass = "alert alert-dismissable";
switch (message.getLevel()) {
case FeedbackMessage.ERROR:
case FeedbackMessage.FATAL:
cssClass += " alert-danger";
break;
case FeedbackMessage.SUCCESS:
cssClass += " alert-success";
break;
case FeedbackMessage.WARNING:
cssClass += " alert-warning";
break;
case FeedbackMessage.INFO:
cssClass += " alert-info";
break;
default:
break;
}
return cssClass;
}
示例4: displayMessage
/**
*
* @param parameters
*/
private void displayMessage(final PageParameters parameters) {
String message = parameters.get(MESSAGE_PARAM).toString(null);
int messageLevel = parameters.get(LEVEL_PARAM).toInt(-1);
if (message != null && messageLevel != -1) {
switch (messageLevel) {
case FeedbackMessage.SUCCESS:
success(message);
break;
case FeedbackMessage.INFO:
info(message);
break;
case FeedbackMessage.WARNING:
warn(message);
break;
case FeedbackMessage.ERROR:
error(message);
break;
}
}
}
示例5: getCSSClass
@Override
protected String getCSSClass(FeedbackMessage message) {
switch (message.getLevel()) {
case FeedbackMessage.ERROR:
case FeedbackMessage.FATAL:
return "alert-danger";
case FeedbackMessage.INFO:
return "alert-info";
case FeedbackMessage.SUCCESS:
return "alert-success";
case FeedbackMessage.WARNING:
case FeedbackMessage.DEBUG:
case FeedbackMessage.UNDEFINED:
default:
return "alert-warning";
}
}
示例6: createHeaderCss
private IModel<String> createHeaderCss() {
return new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
FeedbackMessage result = getModelObject();
if (result == null) {
return " box-warning";
}
switch (result.getLevel()) {
case FeedbackMessage.INFO:
case FeedbackMessage.DEBUG:
return " box-info";
case FeedbackMessage.SUCCESS:
return " box-success";
case FeedbackMessage.ERROR:
case FeedbackMessage.FATAL:
return " box-danger";
case FeedbackMessage.UNDEFINED:
case FeedbackMessage.WARNING: // TODO:
default:
return " box-warning";
}
}
};
}
示例7: findClass
private String findClass() {
int maxLevel = findMaxLevel();
if (maxLevel > FeedbackMessage.WARNING) {
return "alert alert-error";
} else if (maxLevel > FeedbackMessage.SUCCESS) {
return "alert-info";
} else {
return "alert alert-success";
}
}