开发者

JSF inputTextArea valueChangeListener

开发者 https://www.devze.com 2023-03-13 11:18 出处:网络
Is there any way to force firing of valueChangeListener during typing into ancomponent? I am trying to simply count the number of chars user has entered in the textArea without resorting to JavaScrip

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

精彩评论

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