本文整理汇总了Java中javax.faces.component.UIMessage类的典型用法代码示例。如果您正苦于以下问题:Java UIMessage类的具体用法?Java UIMessage怎么用?Java UIMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIMessage类属于javax.faces.component包,在下文中一共展示了UIMessage类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: scan
import javax.faces.component.UIMessage; //导入依赖的package包/类
/**
* Walk the component tree branch built by the composite component and locate the input container elements.
*
* @return a composite object of the input container elements
*/
protected InputContainerElements scan(final UIComponent component, InputContainerElements elements,
final FacesContext context) {
if (elements == null) {
elements = new InputContainerElements();
}
// NOTE we need to walk the tree ignoring rendered attribute because it's condition
// could be based on what we discover
if ((elements.getLabel() == null) && (component instanceof HtmlOutputLabel)) {
elements.setLabel((HtmlOutputLabel) component);
} else if (component instanceof EditableValueHolder) {
elements.registerInput((EditableValueHolder) component, getDefaultValidator(context), context);
} else if (component instanceof UIMessage) {
elements.registerMessage((UIMessage) component);
}
// may need to walk smarter to ensure "element of least suprise"
for (UIComponent child : component.getChildren()) {
scan(child, elements, context);
}
return elements;
}
开发者ID:GluuFederation,项目名称:oxCore,代码行数:28,代码来源:UIInputContainer.java
示例2: encodeEnd
import javax.faces.component.UIMessage; //导入依赖的package包/类
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
// Note our complete disregard for class cast and null exceptions....
UIMessage uiMessage = (UIMessage)component;
String clientId = uiMessage.findComponent(uiMessage.getFor()).getClientId(context);
Iterator iter = context.getMessages(clientId);
if (iter.hasNext()) {
// Just do the first one.
FacesMessage message = (FacesMessage)iter.next();
renderMessage(context, component, message);
}
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:13,代码来源:DivMessageRenderer.java
示例3: message
import javax.faces.component.UIMessage; //导入依赖的package包/类
/**
* Build a faces message.
*
* @param label
* the label to display.
* @param uiMessage
* the ui message on which displaying message.
*/
public void message(final UIMessage uiMessage, final IMessageLabel label) {
final String msg = this.messageBundle.getMessage(label);
final FacesMessage.Severity severity = getFacesSeverity(label
.getSeverity());
if (!getFacesContext().isValidationFailed()
&& (isSeverityError(severity) || isSeverityFatal(severity))) {
getFacesContext().validationFailed();
}
message(uiMessage, severity, msg);
}
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:19,代码来源:FacesMessages.java
示例4: getMessages
import javax.faces.component.UIMessage; //导入依赖的package包/类
public List<UIMessage> getMessages() {
return messages;
}
开发者ID:GluuFederation,项目名称:oxCore,代码行数:4,代码来源:UIInputContainer.java
示例5: registerMessage
import javax.faces.component.UIMessage; //导入依赖的package包/类
public void registerMessage(final UIMessage message) {
messages.add(message);
}
开发者ID:GluuFederation,项目名称:oxCore,代码行数:4,代码来源:UIInputContainer.java
示例6: getUIMessageShowDetailSkip
import javax.faces.component.UIMessage; //导入依赖的package包/类
/**
* used with {@link BooleanPropertyDefaultTest#getPrimitiveDefaultSkips(FacesSharableRegistry)}
* @return
*/
public static Object[] getUIMessageShowDetailSkip() {
return new Object[]{"showDetail", UIMessage.class, true};
}
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:8,代码来源:BaseBooleanPropertyDefaultTest.java
示例7: info
import javax.faces.component.UIMessage; //导入依赖的package包/类
/**
* Build an info faces message.
*
* @param uiMessage
* the ui message on which displaying message.
* @param message
* the message to display.
*/
private void info(final UIMessage uiMessage, final String message) {
message(uiMessage, FacesMessage.SEVERITY_INFO, message);
}
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:12,代码来源:FacesMessages.java
示例8: warn
import javax.faces.component.UIMessage; //导入依赖的package包/类
/**
* Build a warn faces message.
*
* @param uiMessage
* the ui message on which displaying message.
* @param message
* the message to display.
*/
private void warn(final UIMessage uiMessage, final String message) {
message(uiMessage, FacesMessage.SEVERITY_WARN, message);
}
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:12,代码来源:FacesMessages.java
示例9: error
import javax.faces.component.UIMessage; //导入依赖的package包/类
/**
* Build an error faces message.
*
* @param uiMessage
* the ui message on which displaying message.
* @param message
* the message to display.
*/
private void error(final UIMessage uiMessage, final String message) {
message(uiMessage, FacesMessage.SEVERITY_ERROR, message);
}
开发者ID:qjafcunuas,项目名称:jbromo,代码行数:12,代码来源:FacesMessages.java
注:本文中的javax.faces.component.UIMessage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论