Hote however that this does not enforce a limit on the client side, like "maxlength" does for inputText components. It allows any amount of data to be input by the user, then reports an error if it is too long - which is not a nice user experience.

While HTML supports maxlength for INPUT elements it unfortunately defines no such property for TEXTAREA elements. It is possible to simulate this with Javascript - don't know whether the tobago components do this, the Tomahawk ones don't yet.

In my current project we have a custom textareaRenderer class that generates the necessary javascript to limit input on the client side (as well as checking again on the server of course!).

Cheers,

Simon

Bernd Bohmann wrote:
Hello,

use a f:validateLength Tag. The max value of validateLength set the maximum size of the field.

Regards

Bernd

prantor wrote:
Hi,
I want to set fixed length for validation Tobago "in" or "TextArea" tag.
suppose: i have one input field and i want to validate that user must input
maximum 10 character in this field .

Any one suggest me how can i solved this problem.


Reply via email to