Utils.getErrMsg()方法:
public static FacesMessage getErrMsg(String summary) {
if (!isNull(summary)) {
return new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, summary);
}
return null;
} public static FacesMessage getErrMsg(String summary, String detail) {
if (!isNull(summary) && !isNull(detail)) {
return new FacesMessage(FacesMessage.SEVERITY_ERROR, summary,
detail);
}
return null;
}
public static FacesMessage getErrMsg(String summary) {
if (!isNull(summary)) {
return new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, summary);
}
return null;
} public static FacesMessage getErrMsg(String summary, String detail) {
if (!isNull(summary) && !isNull(detail)) {
return new FacesMessage(FacesMessage.SEVERITY_ERROR, summary,
detail);
}
return null;
}
解决方案 »
- 分sheet导出excel数据的问题,急问!
- 有学过ibatis的不??
- 问题求解!线程问题
- struts2+spring2,无法用${sessionScope.xxx}获取session中的数据,请指教
- 开源XWorker已重新发布,有兴趣者可看看
- 发表文章 就能有收入~~
- 郁闷的一踏糊涂.第一次用hql时就出错!不知道错哪了,兄弟们帮我们进来看看啊
- 紧急求救!!!在jboss中怎样配置多个数据库。。。。(在线等)
- apache与weblogic集成
- 关于ejb的基础问题??
- hibernate级联删除
- 我要把这个问题弄清楚。。。。hibernate的超级难问题,,,无2年HIBERNATE经验不要进,嘿嘿
个组件的错误,如果你想通过<h:message for="组件ID"/>这种方式来显示错误,可以通过
在<h:message for="组件ID" validator="#{UserMB.somemethod}"/>的方式,在somemethod
方法中抛出异常信息就可以了。