JSFカスタムコンポジットコンポーネントinput.xhtml
<cc:interface>
<cc:attribute name="validator"/>
</cc:interface>
<cc:implementation>
<h:inputText validator="#{cc.attrs.validator}"/>
</cc:implementation>
* .xhtml
<l:input value = ... validator="#{testValidator.validator}"/>
Javaコード
@ManagedBean
パブリッククラスTestValidator{
public void validator(FacesContext context, UIComponent component, Object value) throws ValidatorException {
System.out.println("Call validator");
}
}
PropertyNotFoundException:
validator="#{testValidator.validator}": The class 'TestValidator' does not have the property 'validator'.
この問題を解決する方法は?私の最後の方法: