我目前正在开发一个动态表单系统,并且必须实现一个功能,其中用户(设置哪些表单字段应该显示来自某些预定义的字段)必须具有能够定义哪些输入字段是必需的,哪些不是。还必须设置以下内容:“应显示字段A和B,您至少需要填写其中一个(A或B,或者如果您希望A和B)提交表格。”JSF/PrimeFaces:填写至少一个X字段
我已存储以下数据:
0: not displayed
1: displayed
2: displayed and required (w/o any dependency to another field)
greater than 1: Custom identifier
实施例:
name: 1
birthday: 2
city: 2
x: 3
y: 3
postal code: 0
随着在设定用户已填写姓名,生日或城市任一和x或年。
JSF是否支持那种“required”字段?
问候
[JSF2.0不支持交叉字段验证,是否有解决方法?](http://stackoverflow.com/questions/6282466/jsf2-0-doesnt-support-cross-field-验证是否有解决方法) – kolossus 2014-11-05 14:34:25