开发者

JSF inputTextArea valueChangeListener

Is there any way to force firing of valueChangeListener during typing into an component?

I am trying to simply count the number of chars user has entered in the textArea without resorting to JavaScript coding, but it simply won't budge.

Any ideas would be appreciated.

Here's the code:

<ice:inputTextarea maxlength="4000" style="height: 400px; width: 400px;" 
value="#{controller.remarkText}"
va开发者_StackOverflowlueChangeListener="#{controller.updateTextCount}" />

<ice:inputText readonly="true" size="3" maxlength="4" value="#{controller.remarkTextCharCount}" />

We're using IceFaces 1.8.2 and JSF 1.2.


Did you try adding partialSubmit="true" , that said however it would be submitting every character to the server and that is not an ideal solution. A simple javascript based validation is valid for this use case.

Cheers!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜