• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom messages in Hibernate Validators  RSS feed

 
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;


}
}
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!