0
我想将自定义验证程序附加到复合组件内的一个输入字段,但验证程序根本没有启动。 我已经完全按照here的描述完成了,但我无法完成它的工作。同样在我的代码中,对复合组件输入验证器(for="validateService"
)的引用标记为红色cannot resolve symbol 'validateService'
。我究竟做错了什么?为什么复合组件验证程序的引用没有解决?
component.xhtml
<cc:interface>
<cc:attribute name="service"/>
<cc:editableValueHolder name="validateService" targets="#{cc.attrs.service}"/>
</cc:interface>
page.xhtml
<cc:myComponent id="input"
service="#{myBean.service}"
<f:validator validatorId="serviceValidator" for="validateService"/>
</cc:myComponent>