ReportHelperpublic abstract class ReportHelper extends Object helper class with convenience util methods
for reporting errors |
Fields Summary |
---|
static final String | ATTR_ERROR_MSG_PREFIX | static final String | ERROR_MSG_PREFIX |
Methods Summary |
---|
private static java.lang.String | getAttributeNameMsgPrefix(ValidationContext valCtx)
if(valCtx.attrName==null)
return "";
return valCtx.smh.getLocalString("common.AttributeErrorMsgPrefix",
"Attribute {0}: ", new Object[] {valCtx.attrName});
| public static void | reportAttributeError(ValidationContext valCtx, java.lang.String msgNameSuffix, java.lang.String defaultMsg, java.lang.Object[] values)reports attribute validation error
valCtx.result.failed( /*getAttributeNameMsgPrefix(valCtx) + */
valCtx.smh.getLocalString(ATTR_ERROR_MSG_PREFIX + msgNameSuffix, defaultMsg, values) );
| public static void | reportValidationError(ValidationContext valCtx, java.lang.String msgNameSuffix, java.lang.String defaultMsg, java.lang.Object[] values)reports validation error
valCtx.result.failed(
valCtx.smh.getLocalString(ERROR_MSG_PREFIX + msgNameSuffix,
defaultMsg, values) );
|
|