File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "validation of inputText in rich:dataTable" Watch "validation of inputText in rich:dataTable" New topic
Author

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,
Srikanth
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

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.
 
 
subject: validation of inputText in rich:dataTable
 
Similar Threads
Error while displaying validation message for inputText generated dynamically in rich:dataTable
Split Pane effect with JSF 1.2, Facelets, Javascript, RichFaces
display multiple rich:dataTables
Could a datatable has two footer rows? how to do that?
Datatable Conditional Row Colors