Validation Error only for data in UTF-8 in h:selectOneMeny
-
19-10-2022 - |
Question
There is a amazing bug in my jsf application. I create selectOneMenu component in the code
private Map<String,String> languages; //+getter
private String language; //+getter/setter
@PostConstruct
public void init() {
languages = new LinkedHashMap<String, String>();
languages.put("Русский", "ru");
languages.put("Казахский", "kz");
}
and on the page
<h:selectOneMenu id="language" value="#{bean.language}">
<f:selectItems value="#{bean.languages}"/>
</h:selectOneMenu>
and after submit everything is ok.But if I change itemValue from
languages.put("Русский", "ru");
to
languages.put("Русский", "рус.язык");
then after submit I got "Validation Error: Value is not valid". Why? I really don't understand.
I use jsf 2.1.7, application server - JBoss.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow