开发者

How to pass parameters to a validator of a rich:inplaceInput component

I've seen BalusC's page on passing values to a validator but that is using inputText components. I'm using rich:inplaceInput components and it doesn't se开发者_C百科em to work. Can someone tell me if it is possible, and if it is how to do simply?

Thanks


For sure you can add validators to rich:inplaceEdit. Here is an example:

<rich:inplaceEdit required="true" value="#{myBean.name}">
  <f:validateLength minimum="3" maximum="25" />
</rich:inplaceEdit>

This validates that the field is filled in (required="true") and that the entered text has a length between 3 and 25 characters ().

If you don't see any error message make sure you have a message component that displays your error message and that is properly updated.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜