Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现 jsf 验证器绑定到 selectOneMenu,仅当 selectOneMenu 具有 required="true" 时才会调用提交。我如何解决这个问题以调用没有该属性的验证器?
我发现 jsf 验证器绑定到 selectOneMenu,仅当 selectOneMenu 具有 required="true" 时才会调用提交。
这确实是规范。顺便说一下,这也适用于所有其他输入元素。
我如何解决这个问题以调用没有该属性的验证器?
你不能。required="true"如果您要求最终用户选择一个项目,只需指定属性。默认情况下它是可选的,因为在某些情况下您可能不需要最终用户选择一个项目。
required="true"