Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom messages in Hibernate Validators

 
Lee Mark
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Link

following this link i can get the custom messages but from properties file. what if i need same from class i mean

some thing like.. public class Messages_en_US extends ListResourceBundle {

@Override
protected Object[][] getContents() {
labelsArray = new Object[labels.size()][2];
int counter = 0;


labelsArray[counter][0] = "key.val";
labelsArray[counter][1] = "value from Db";

labelsArray[++counter][0] = "key";
labelsArray[++counter][1] = "value from Db";
return labelsArray;


}
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic