JSF转换器资源包消息 [英] JSF converter resource bundle messages

查看:127
本文介绍了JSF转换器资源包消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道我可以在哪里获得JSF使用的转换器的列表,以便我可以在资源包中为它们设置自定义消息吗?

Does anyone know where I can get a list of the converters used by JSF so I can set a custom message for them in the resource bundle?

推荐答案

您可以在

You can find them all in chapter 2.5.2.4 of the JSF specification. Here's an extract of relevance:

  • javax.faces.component.UIInput.CONVERSION-{0}:发生转换错误
  • javax.faces.converter.BigDecimalConverter.DECIMAL = {2}:"{0}"必须是带符号的十进制数字.
  • javax.faces.converter.BigDecimalConverter.DECIMAL_detail = {2}:"{0}"必须是一个带符号的十进制数字,由零个或多个数字组成,后面可以跟一个小数点和一个小数.示例:{1}
  • javax.faces.converter.BigIntegerConverter.BIGINTEGER = {2}:"{0}"必须是由一位或多位数字组成的数字.
  • javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail = {2}:"{0}"必须是由一个或多个数字组成的数字.示例:{1}
  • javax.faces.converter.BooleanConverter.BOOLEAN = {1}:"{0}"必须为"true"或"false".
  • javax.faces.converter.BooleanConverter.BOOLEAN_detail = {1}:"{0}"必须为"true"或"false".除"true"以外的任何值都将取值为"false".
  • javax.faces.converter.ByteConverter.BYTE = {2}:"{0}"必须为0到255之间的数字.
  • javax.faces.converter.ByteConverter.BYTE_detail = {2}:"{0}"必须是0到255之间的数字.例如:{1}
  • javax.faces.converter.CharacterConverter.CHARACTER = {1}:"{0}"必须是有效字符.
  • javax.faces.converter.CharacterConverter.CHARACTER_detail = {1}:``{0}''必须是有效的ASCII字符.
  • javax.faces.converter.DateTimeConverter.DATE = {2}:"{0}"不能理解为日期.
  • javax.faces.converter.DateTimeConverter.DATE_detail = {2}:"{0}"不能理解为日期.示例:{1}第2章请求处理生命周期2-19
  • javax.faces.converter.DateTimeConverter.TIME = {2}:"{0}"不能理解为时间.
  • javax.faces.converter.DateTimeConverter.TIME_detail = {2}:不能将"{0}"理解为时间.示例:{1}
  • javax.faces.converter.DateTimeConverter.DATETIME = {2}:"{0}"不能理解为日期和时间.
  • javax.faces.converter.DateTimeConverter.DATETIME_detail = {2}:"{0}"不能理解为日期和时间.示例:{1}
  • javax.faces.converter.DateTimeConverter.PATTERN_TYPE = {1}:必须指定'pattern'或'type'属性,以转换值"{0}".
  • javax.faces.converter.DoubleConverter.DOUBLE = {2}:"{0}"必须是由一个或多个数字组成的数字.
  • javax.faces.converter.DoubleConverter.DOUBLE_detail = {2}:"{0}"必须是4.9E-324和1.7976931348623157E308之间的数字,例如:{1}
  • javax.faces.converter.EnumConverter.ENUM = {2}:"{0}"必须可转换为枚举.
  • javax.faces.converter.EnumConverter.ENUM_detail = {2}:"{0}"必须可从包含常量"{1}"的枚举转换为枚举.
  • javax.faces.converter.EnumConverter.ENUM_NO_CLASS = {1}:"{0}"必须可以从枚举转换为枚举,但不提供枚举类.
  • javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail = {1}:"{0}"必须可从枚举转换为枚举,但未提供枚举类.
  • javax.faces.converter.FloatConverter.FLOAT = {2}:"{0}"必须是包含一个或多个数字的数字.
  • javax.faces.converter.FloatConverter.FLOAT_detail = {2}:"{0}"必须是1.4E-45和3.4028235E38之间的数字,例如:{1}
  • javax.faces.converter.IntegerConverter.INTEGER = {2}:"{0}"必须是一个或多个数字组成的数字.
  • javax.faces.converter.IntegerConverter.INTEGER_detail = {2}:"{0}"必须为-2147483648和2147483647之间的数字,例如:{1}
  • javax.faces.converter.LongConverter.LONG = {2}:"{0}"必须是一个或多个数字组成的数字.
  • javax.faces.converter.LongConverter.LONG_detail = {2}:"{0}"必须是-9223372036854775808到9223372036854775807之间的数字,例如:{1}
  • javax.faces.converter.NumberConverter.CURRENCY = {2}:"{0}"不能理解为货币值.
  • javax.faces.converter.NumberConverter.CURRENCY_detail = {2}:不能将"{0}"理解为货币值.示例:{1}
  • javax.faces.converter.NumberConverter.PERCENT = {2}:"{0}"不能理解为百分比.
  • javax.faces.converter.NumberConverter.PERCENT_detail = {2}:不能将"{0}"理解为百分比.示例:{1}
  • javax.faces.converter.NumberConverter.NUMBER = {2}:"{0}"不是数字.
  • javax.faces.converter.NumberConverter.NUMBER_detail = {2}:"{0}"不是数字.示例:{1}
  • javax.faces.converter.NumberConverter.PATTERN = {2}:"{0}"不是数字模式.
  • javax.faces.converter.NumberConverter.PATTERN_detail = {2}:"{0}"不是数字模式.示例:{1}
  • javax.faces.converter.ShortConverter.SHORT = {2}:"{0}"必须是由一个或多个数字组成的数字.
  • javax.faces.converter.ShortConverter.SHORT_detail = {2}:"{0}"必须为-32768到32767之间的数字,例如:{1}
  • javax.faces.converter.STRING = {1}:无法将"{0}"转换为字符串.
  • javax.faces.component.UIInput.CONVERSION -- {0}: Conversion error occurred
  • javax.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' must be a signed decimal number.
  • javax.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' must be a signed decimal number consisting of zero or more digits, that may be followed by a decimal point and fraction. Example: {1}
  • javax.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' must be a number consisting of one or more digits.
  • javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' must be a number consisting of one or more digits. Example: {1}
  • javax.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' must be 'true' or 'false'.
  • javax.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' must be 'true' or 'false'. Any value other than 'true' will evaluate to 'false'.
  • javax.faces.converter.ByteConverter.BYTE={2}: ''{0}'' must be a number between 0 and 255.
  • javax.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' must be a number between 0 and 255. Example: {1}
  • javax.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' must be a valid character.
  • javax.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' must be a valid ASCII character.
  • javax.faces.converter.DateTimeConverter.DATE={2}: ''{0}'' could not be understood as a date.
  • javax.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' could not be understood as a date. Example: {1} Chapter 2 Request Processing Lifecycle 2-19
  • javax.faces.converter.DateTimeConverter.TIME={2}: ''{0}'' could not be understood as a time.
  • javax.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' could not be understood as a time. Example: {1}
  • javax.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}'' could not be understood as a date and time.
  • javax.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' could not be understood as a date and time. Example: {1}
  • javax.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: A 'pattern' or 'type' attribute must be specified to convert the value ''{0}''.
  • javax.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' must be a number consisting of one or more digits.
  • javax.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' must be a number between 4.9E-324 and 1.7976931348623157E308 Example: {1}
  • javax.faces.converter.EnumConverter.ENUM={2}: ''{0}'' must be convertible to an enum.
  • javax.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' must be convertible to an enum from the enum that contains the constant ''{1}''.
  • javax.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided.
  • javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided.
  • javax.faces.converter.FloatConverter.FLOAT={2}: ''{0}'' must be a number consisting of one or more digits.
  • javax.faces.converter.FloatConverter.FLOAT_detail={2}: ''{0}'' must be a number between 1.4E-45 and 3.4028235E38 Example: {1}
  • javax.faces.converter.IntegerConverter.INTEGER={2}: ''{0}'' must be a number consisting of one or more digits.
  • javax.faces.converter.IntegerConverter.INTEGER_detail={2}: ''{0}'' must be a number between -2147483648 and 2147483647 Example: {1}
  • javax.faces.converter.LongConverter.LONG={2}: ''{0}'' must be a number consisting of one or more digits.
  • javax.faces.converter.LongConverter.LONG_detail={2}: ''{0}'' must be a number between -9223372036854775808 to 9223372036854775807 Example: {1}
  • javax.faces.converter.NumberConverter.CURRENCY={2}: ''{0}'' could not be understood as a currency value.
  • javax.faces.converter.NumberConverter.CURRENCY_detail={2}: ''{0}'' could not be understood as a currency value. Example: {1}
  • javax.faces.converter.NumberConverter.PERCENT={2}: ''{0}'' could not be understood as a percentage.
  • javax.faces.converter.NumberConverter.PERCENT_detail={2}: ''{0}'' could not be understood as a percentage. Example: {1}
  • javax.faces.converter.NumberConverter.NUMBER={2}: ''{0}'' is not a number.
  • javax.faces.converter.NumberConverter.NUMBER_detail={2}: ''{0}'' is not a number. Example: {1}
  • javax.faces.converter.NumberConverter.PATTERN={2}: ''{0}'' is not a number pattern.
  • javax.faces.converter.NumberConverter.PATTERN_detail={2}: ''{0}'' is not a number pattern. Example: {1}
  • javax.faces.converter.ShortConverter.SHORT={2}: ''{0}'' must be a number consisting of one or more digits.
  • javax.faces.converter.ShortConverter.SHORT_detail={2}: ''{0}'' must be a number between -32768 and 32767 Example: {1}
  • javax.faces.converter.STRING={1}: Could not convert ''{0}'' to a string.

您还可以在JSF API JAR文件的javax.faces.Messages属性文件中找到它们.复制和编辑起来更容易:)

You can also find them in javax.faces.Messages properties file in the JSF API JAR file. That's easier copying and editing :)

这篇关于JSF转换器资源包消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆