2014-10-30 24 views
-1
I have the jsf input text as double type in pojo class. 
i want to validate that field with empty check.by default in page load the value comes as 0.0 in the text field.once i clear the value(i.e empty value) and click submit button, the text field is not getting validated. 

任何幫助,將不勝感激。如何驗證jsf中雙精度型的空值?

回答

1

如果你希望它出現空比你可以從double(原始)變成Double(對象)

和字段設置爲required="true"