- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
private String getMessage(String prop, boolean suffixEnabled) {
String title = null;
if (prop.equals("headerTitle.suffix")) {
try {
title = messageSource.getMessage("headerTitle.suffix", null, locale);
} catch (NoSuchMessageException e) {
//e.printStackTrace();
}
if (title == null)
title = "";
} else {
try {
title = messageSource.getMessage(prop, null, locale);
if (suffixEnabled)
title += " " + messageSource.getMessage("headerTitle.suffix", null, locale);
} catch (NoSuchMessageException e) {
//e.printStackTrace();
}
if (title == null) {
try {
title = messageSource.getMessage("headerTitle.default", null, locale);
} catch (NoSuchMessageException ex) {
title = "";
}
}
}
return title;
}