This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 15959

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: validation of inputText in rich:dataTable
Similar Threads
Datatable Conditional Row Colors
display multiple rich:dataTables
Could a datatable has two footer rows? how to do that?
Split Pane effect with JSF 1.2, Facelets, Javascript, RichFaces
Error while displaying validation message for inputText generated dynamically in rich:dataTable