当前位置: 首页>>代码示例>>Java>>正文


Java FeedbackMessage.ERROR属性代码示例

本文整理汇总了Java中org.apache.wicket.feedback.FeedbackMessage.ERROR属性的典型用法代码示例。如果您正苦于以下问题:Java FeedbackMessage.ERROR属性的具体用法?Java FeedbackMessage.ERROR怎么用?Java FeedbackMessage.ERROR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.wicket.feedback.FeedbackMessage的用法示例。


在下文中一共展示了FeedbackMessage.ERROR属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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";
	}
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:20,代码来源:OperationResultPanel.java

示例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 "";
    }
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:18,代码来源:BootstrapFeedbackPanel.java

示例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;
}
 
开发者ID:webanno,项目名称:webanno,代码行数:22,代码来源:BootstrapFeedbackPanel.java

示例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;
		}
	}
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:24,代码来源:BasePage.java

示例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";
    }
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:17,代码来源:MainFeedback.java

示例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";
					}
				}

		};
	}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:30,代码来源:ValidationErrorPanel.java

示例7: configureFeedback

private void configureFeedback() {

		// activate feedback panel
		final FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");
		feedbackPanel.setOutputMarkupId(true);
		feedbackPanel.setVisible(false);
		
		add(feedbackPanel);

		// don't show filtered feedback errors in feedback panel
		int[] filteredErrorLevels = new int[] { FeedbackMessage.ERROR };
		feedbackPanel.setFilter(new ErrorLevelsFeedbackMessageFilter(
				filteredErrorLevels));
	}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:14,代码来源:ViewPicture.java

示例8: configureFeedback

private void configureFeedback() {

		// activate feedback panel
		final FeedbackPanel feedback = new FeedbackPanel("feedback");
		feedback.setOutputMarkupId(true);
		add(feedback);

		// don't show filtered feedback errors in feedback panel
		int[] filteredErrorLevels = new int[] { FeedbackMessage.ERROR };
		feedback.setFilter(new ErrorLevelsFeedbackMessageFilter(
				filteredErrorLevels));
	}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:12,代码来源:ViewPictures.java

示例9: getCSSClass

protected String getCSSClass(FeedbackMessage message) {
	String cssClass = "alert alert-info";
	switch (message.getLevel()) {
	case FeedbackMessage.ERROR:
		cssClass = "alert alert-danger";
		break;
	case FeedbackMessage.SUCCESS:
		cssClass = "alert alert-success";
		break;
	default:
		break;
	}
	return cssClass;
}
 
开发者ID:aracrown,项目名称:ara-commons,代码行数:14,代码来源:BootstrapFeedbackPanel.java

示例10: onException

@Override
public void onException(File file, Exception e) {
    String message = String.format("Could not convert file '%s'. Did you provide a valid MS Word file as input? [%s: %s]",
            inputName, e.getClass().getSimpleName(), e.getMessage());
    feedbackMessage = new FeedbackMessage(DemoPage.this, message, FeedbackMessage.ERROR);
    LOGGER.error(message, e);
}
 
开发者ID:documents4j,项目名称:documents4j,代码行数:7,代码来源:DemoPage.java

示例11: accept

@Override
public boolean accept(FeedbackMessage message) {
	return FeedbackMessage.ERROR != message.getLevel();
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:ImportExportPage.java

示例12: onCancel

@Override
public void onCancel(File file) {
    String message = String.format("File conversion of '%s' was cancelled.", inputName);
    feedbackMessage = new FeedbackMessage(DemoPage.this, message, FeedbackMessage.ERROR);
    LOGGER.error(message);
}
 
开发者ID:documents4j,项目名称:documents4j,代码行数:6,代码来源:DemoPage.java


注:本文中的org.apache.wicket.feedback.FeedbackMessage.ERROR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。