This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Validation in dataTable

 
deepa durai
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to validate the fields in the dataTable and the custom error message needs to be displayed on the top not beside the field.
I am able to display the error message beside the field.(<h:message for="email" style="color:red"/>).
But the error message is not displayed outside the dataTable.Can anyone help me please
 
viswanath yadav
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

keep the message tag seperately in panelGrid above the DataTable and declare the message tag as Globally like the code shown below,

<h:panelGrid id="panel1" columns="1" width="100%">
<h:messages id="message_queryDesign" globalOnly="true" layout="table" showDetail="true" errorClass="ERROR" infoClass="INFO" />
</h:panelGrid>

then it will work fine.





Thanks ,

A.Viswanath Yadav
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic