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


Java FeedbackMessage.getLevel方法代码示例

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


在下文中一共展示了FeedbackMessage.getLevel方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createMessageTooltip

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
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,代码行数:21,代码来源:OperationResultPanel.java

示例2: getCSSClass

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
@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,代码行数:23,代码来源:BootstrapFeedbackPanel.java

示例3: getCSSClass

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
@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,代码行数:18,代码来源:MainFeedback.java

示例4: createHeaderCss

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
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,代码行数:31,代码来源:ValidationErrorPanel.java

示例5: accept

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
@Override
public boolean accept(FeedbackMessage message) {
	if (message.getReporter() == null) {
		return false;
	} else {
		return (container.contains(message.getReporter(), true) || container == message.getReporter())
				&& message.getLevel() == level;
	}
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:10,代码来源:ErrorLevelContainerFeedbackMessageFilter.java

示例6: accept

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
/**
    * Method accept, only accept FeedbackMessages that are not in the list of error levels to filter.
    *
    * @param message of type FeedbackMessage
    * @return boolean
    */
   public boolean accept(FeedbackMessage message){
       for (int errorLevel : filteredErrorLevels) {
           if (message.getLevel() == errorLevel) {
               return false;
           }
       }

       return true;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:16,代码来源:ErrorLevelsFeedbackMessageFilter.java

示例7: getCSSClass

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
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,代码行数:15,代码来源:BootstrapFeedbackPanel.java

示例8: accept

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
@Override
public boolean accept(FeedbackMessage message) {
	return FeedbackMessage.ERROR != message.getLevel();
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:5,代码来源:ImportExportPage.java

示例9: accept

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
public boolean accept(FeedbackMessage message) {
	return message.getLevel() == errorLevel;
}
 
开发者ID:premium-minds,项目名称:pm-wicket-utils,代码行数:4,代码来源:ExactErrorLevelFeedbackMessageFilter.java

示例10: accept

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
public boolean accept(FeedbackMessage m) {
	return m.getLevel()==level;
}
 
开发者ID:premium-minds,项目名称:pm-wicket-utils,代码行数:4,代码来源:BootstrapFeedbackPanel.java

示例11: renderFeedback

import org.apache.wicket.feedback.FeedbackMessage; //导入方法依赖的package包/类
private String renderFeedback() {
	//	this.getComponent().getFeedbackMessage();
	FeedbackMessages fm = Session.get().getFeedbackMessages();
	
	Iterator<FeedbackMessage> iter = fm.iterator();
	StringBuilder sb = new StringBuilder();
	while (iter.hasNext()) {
		FeedbackMessage message = iter.next();
		if ((message.getReporter() != null) || message.isRendered()) {
			// if a component-level message, don't show it
			continue;
		}
		
		// if we are info stick set to info else set to message level
		String cssClassSuffix = "";
		switch (message.getLevel()) {
			case INFO_STICKY:
			case INFO_FADE:	
				cssClassSuffix = "INFO";
				break;
			case ERROR_STICKY:
				cssClassSuffix = "ERROR";
				break;
			default:
				cssClassSuffix = message.getLevelAsString();
				break;
		}			
		Serializable serializable = message.getMessage();
		
		// grab the message, if it's null use an empty string
		String msg = (serializable == null) ? StringUtils.EMPTY : serializable.toString();
		
		sb.append("$.jGrowl(\"").append(escape(msg)).append('\"');
		sb.append(", {");
		// set the css style, i.e. the theme
		sb.append("theme: \'jgrowl-").append(cssClassSuffix).append("\'");
           // set afterOpen
           String afterOpen = getAfterOpenJavaScript();
           if (StringUtils.isNotEmpty(afterOpen)) {
               sb.append(", afterOpen: " + getAfterOpenJavaScript());
           }
		// set sticky
		if (message.getLevel() > FeedbackMessage.INFO) {
			sb.append(", sticky: true");
		} else {
			// default is 3000 (3sec)
			sb.append(", life: 5000");
		}

		sb.append("});");

           message.markRendered();
	}
	
	return sb.toString();
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:57,代码来源:JGrowlAjaxBehavior.java


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