IntelliJ open source
[Logo] JavaRanch » Big Moose Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Object Relational Mapping
 
RSS feed
 
New topic
Author

Custom messages in Hibernate Validators

Lee Mark
Ranch Hand

Joined: Mar 05, 2009
Messages: 42

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;


}
}
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Object Relational Mapping
 
RSS feed
 
New topic
IntelliJ open source

.