开发者

Validator for composite component validates, but also throws exception

I want to attach validator to composite component, and I want it to be attached to every child component inside:

<cc:interface>
  <cc:attribute name="validator"
                method-signature="void f(javax.faces.context.FacesContext,
                                         javax.faces.component.UIComponent,
                                         java.lang.Object)"
                targets="child1 child2"/>
  <cc:editableValueHolder name="child1"/>
  <cc:editableValueHolder name="child2"/>
</cc:interface>
<cc:implementation>
  <h:inputText id="child1"/>
  <h:inputText id="child2"/>
</cc:implementation>

So on page I have:

<xxx:mycomponent validator="#{bean.validationMethod}"/>

Validation works as expected, but JSF also throws a message: ..../form.xhtml validator="#{bean.validationMethod}": The class 'my.package.Bean' does not have the property 'validationMethod'.

Ho开发者_运维百科w can I get rid of this message?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜