當前位置: 首頁>>代碼示例>>Java>>正文


Java FacesMessage.Severity方法代碼示例

本文整理匯總了Java中javax.faces.application.FacesMessage.Severity方法的典型用法代碼示例。如果您正苦於以下問題:Java FacesMessage.Severity方法的具體用法?Java FacesMessage.Severity怎麽用?Java FacesMessage.Severity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.faces.application.FacesMessage的用法示例。


在下文中一共展示了FacesMessage.Severity方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getMessageType

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
@Override
protected String getMessageType(
  UIComponent component,
  FacesBean   bean)
{
  String messageType = null;

  FacesMessage.Severity maxSeverity =
    FacesContext.getCurrentInstance().getMaximumSeverity();

  // Map FacesMessage severity to levels expected by panelHeaderRenderer
  if (maxSeverity == null)
    messageType = XhtmlConstants.MESSAGE_TYPE_ERROR;
  else if (FacesMessage.SEVERITY_FATAL.equals(maxSeverity))
    messageType = XhtmlConstants.MESSAGE_TYPE_ERROR;
  else if (FacesMessage.SEVERITY_ERROR.equals(maxSeverity))
    messageType = XhtmlConstants.MESSAGE_TYPE_ERROR;
  else if (FacesMessage.SEVERITY_WARN.equals(maxSeverity))
    messageType = XhtmlConstants.MESSAGE_TYPE_WARNING;
  else if (FacesMessage.SEVERITY_INFO.equals(maxSeverity))
    messageType = XhtmlConstants.MESSAGE_TYPE_INFO;

  return messageType;
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:25,代碼來源:MessageBoxRenderer.java

示例2: _createFacesMessage

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
private static FacesMessage _createFacesMessage(
  FacesMessage.Severity severity,
  ErrorMessages messageStrings,
  Object label
  )
{
  if (messageStrings instanceof BindingErrorMessages)
  {
     return new BindingFacesMessage(severity, messageStrings, label);
  }

  String summary = messageStrings.getMessage();
  String detail  = messageStrings.getDetailMessage();

  return new LabeledFacesMessage(severity, summary, detail, label);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:17,代碼來源:MessageFactory.java

示例3: LabeledFacesMessage

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
/**
 * Creates a LabeledFacesMessage without a pre-set label.
 * @param severity the severity of the message
 * @param summary the message summary
 * @param detail the message detail
 */
public LabeledFacesMessage(
  FacesMessage.Severity severity,
  String summary,
  String detail)
{
  super(severity, summary, detail);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:14,代碼來源:LabeledFacesMessage.java

示例4: prepareOrganizationBean

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
private OrganizationBean prepareOrganizationBean() {
    return organizationBean = new OrganizationBean() {
        /**
         * 
         */
        private static final long serialVersionUID = 8837356005032690342L;

        @Override
        public void addMessage(final String clientId,
                final FacesMessage.Severity severity, final String key) {
            messageKey = key;
        }
    };
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:15,代碼來源:OrganizationBeanTest.java

示例5: BusinessException

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
/**
 * @param summary exception summary
 * @param detail exception detail
 * @param severity Faces message severity
 */
public BusinessException(String summary, String detail, FacesMessage.Severity severity) {
    super(summary);
    this.detail = detail;
    this.summary = summary;
    this.severity = severity;
}
 
開發者ID:adminfaces,項目名稱:admin-template,代碼行數:12,代碼來源:BusinessException.java

示例6: addFieldInputMessages

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
public static void addFieldInputMessages(String index, FacesMessage.Severity severity, String message) {
	if (index != null && index.length() > 0) {
		Iterator<String> it = INPUT_FIELD_COMPONENT_CLIENT_ID_PREFIXES.iterator();
		while (it.hasNext()) {
			Messages.addMessageId(it.next() + index, severity, message);
		}
	} else {
		Messages.addMessage(severity, message);
	}
}
 
開發者ID:phoenixctms,項目名稱:ctsms,代碼行數:11,代碼來源:Messages.java

示例7: addLocalizedMessageId

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
public static void addLocalizedMessageId(String id, FacesMessage.Severity severity, String l10nKey, Object... args) {
	FacesContext context = FacesContext.getCurrentInstance();
	addMessageId(context, id, severity, CommonUtil.getMessage(l10nKey, args, getMessageResourceBundle(context), DEFAULT_FACES_MESSAGE));
}
 
開發者ID:phoenixctms,項目名稱:ctsms,代碼行數:5,代碼來源:Messages.java

示例8: addMessage

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
public void addMessage(FacesMessage.Severity severity, String msgKey,
        Object... params) {
    JSFUtils.addMessage(null, severity, msgKey, params);
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:5,代碼來源:UserGroupListCtrl.java

示例9: addMessage

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
public void addMessage(FacesMessage.Severity severityError, String msgKey) {
    JSFUtils.addMessage(null, severityError, msgKey, null);
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:4,代碼來源:UpgradeWizardConversation.java

示例10: addLocalizedMessageClientId

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
public static void addLocalizedMessageClientId(String clientId, FacesMessage.Severity severity, String l10nKey, Object... args) {
	FacesContext context = FacesContext.getCurrentInstance();
	addMessageClientId(context, clientId, severity, CommonUtil.getMessage(l10nKey, args, getMessageResourceBundle(context), DEFAULT_FACES_MESSAGE));
}
 
開發者ID:phoenixctms,項目名稱:ctsms,代碼行數:5,代碼來源:Messages.java

示例11: addMessage

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
@Override
public void addMessage(final String clientId,
        final FacesMessage.Severity severity, final String key) {
    super.addMessage(clientId, severity, key, (Object[]) null);
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:6,代碼來源:LdapConfigurationCtrl.java

示例12: addMessageClientId

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
private static void addMessageClientId(FacesContext context, String clientId, FacesMessage.Severity severity, String message) {
	if (context != null) {
		FacesMessage facesMessage = new FacesMessage(severity, message, null);
		context.addMessage(clientId, facesMessage);
	}
}
 
開發者ID:phoenixctms,項目名稱:ctsms,代碼行數:7,代碼來源:Messages.java

示例13: setSeverity

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
@Override
public void setSeverity(FacesMessage.Severity severity)
{
  _wrapped.setSeverity(severity);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:6,代碼來源:FacesMessageWrapper.java

示例14: getMaximumSeverity

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
@Override
public FacesMessage.Severity getMaximumSeverity()
{
  return null;
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:6,代碼來源:PseudoFacesContext.java

示例15: addLocalizedMessage

import javax.faces.application.FacesMessage; //導入方法依賴的package包/類
public static void addLocalizedMessage(FacesMessage.Severity severity, String l10nKey, Object... args) {
	FacesContext context = FacesContext.getCurrentInstance();
	addMessage(context, severity, CommonUtil.getMessage(l10nKey, args, getMessageResourceBundle(context), DEFAULT_FACES_MESSAGE));
}
 
開發者ID:phoenixctms,項目名稱:ctsms,代碼行數:5,代碼來源:Messages.java


注:本文中的javax.faces.application.FacesMessage.Severity方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。