[英]Changing the h:message JSF standard error message
We are trying to alter the standard JSF error message that is output by the tag to not include the JSF rendered ID of the element. 我们正在尝试更改标记输出的标准JSF错误消息,使其不包含元素的JSF呈现ID。 So for example:
例如:
j_id1840598516_6db54dbe:terms: Validation Error: Value is required.
j_id1840598516_6db54dbe:terms:验证错误:值是必需的。
to look like: 看起来像:
terms: Validation Error: Value is required.
术语:验证错误:值是必需的。
Use the UIInput
component's label
attribute. 使用
UIInput
组件的label
属性。 Eg 例如
<h:inputText ... label="terms" />
Check these articles, http://www.ibm.com/developerworks/java/library/j-jsf3/ http://www.javabeat.net/articles/189-java-ee-5-development-using-glassfish-application-serve-3.html 查看这些文章, http : //www.ibm.com/developerworks/java/library/j-jsf3/ http://www.javabeat.net/articles/189-java-ee-5-development-using-glassfish-应用服务,3.html
and there's a similar question in stackoverflow in this link. 并且在此链接中的stackoverflow中存在类似的问题。 How to customize JSF validation error message
如何自定义JSF验证错误消息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.