开发者

f:validateDoubleRange localization

开发者 https://www.devze.com 2023-03-24 21:37 出处:网络
I have poblem with localized message for validation error in the f:validateDoubleRange <h:inputText id=\"inputId\" required=\"true\"

I have poblem with localized message for validation error in the f:validateDoubleRange

<h:inputText id="inputId" required="true"
        value="#{bean.value}">
     <f:validateDoubleRange minimum="0"/>
</h:inputText>

I try to localize error message in my registered properties file this way:

javax.faces.converter.DoubleConverter.DOUBLE_detail=Some new message

but the message remains the same like in the javax/faces/Messages.properties

javax.f开发者_StackOverflow中文版aces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' must be a number between 4.9E-324 and 1.7976931348623157E308  Example: {1}

Maybe do I trying to change no that message?


By default, only the summary message will be displayed by <h:message> and <h:messages>, but you're overriding the detail message.

You need to override the summary message instead:

javax.faces.converter.DoubleConverter.DOUBLE=Some new message

The detail message is only displayed whenever you use

<h:messages showSummary="false" showDetail="true" />
0

精彩评论

暂无评论...
验证码 换一张
取 消