if (messageKey == null || StringUtils.isBlank(messageKey) && StringUtils.isNotBlank(defaultValue)) {
message = StringUtils.capitalize(defaultValue);
}
// the titleKey attribute is used
else {
OgnlValueStack stack = (OgnlValueStack) TagUtils.getStack(pageContext);
for (Object o : stack.getRoot()) {
if (o instanceof TextProvider) {
TextProvider tp = (TextProvider) o;
message = tp.getText(messageKey, UNDEFINED_KEY + messageKey + UNDEFINED_KEY);
break;
}