File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes validation of inputText in rich:dataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "validation of inputText in rich:dataTable" Watch "validation of inputText in rich:dataTable" New topic

validation of inputText in rich:dataTable

srikanth Thandra
Ranch Hand

Joined: Mar 04, 2009
Posts: 42

How to provide validation for inputText component in rich:dataTable?

Suppose that sessionScope listVlaues has two objetcs. So dataTable contains two outputTexts and two InputTexts. Now my requirement is, I have to show a validation message "Enter only Number" for inputText under below of inputText.

How can i achieve this? kindly post the reply as soon as possible

Thanx in advance,
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

You've miscoded your inputText. It would be more like:

I don't remember the exact name or format of the regex pattern validator, however, so this is just a guideline. Also, as written the error message will be to the right of the text control unless you have text wrapping in that column. Solutions include the brute-force approach of adding a raw HTML <br/> tag to force a new line (not recommended) or wrapping the input control and message in a dataGrid component that's 1 column wide.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: validation of inputText in rich:dataTable
It's not a secret anymore!