rice-framework/krad-web/src/main/webapp/krad/scripts/krad.validate.js
/**
 * Generates a count message that can be used in a header or summary link based on total amount of errors, warnings,
 * and info messages totals passed in
 * @param errorTotal - total number of errors
 * @param warningTotal - total number of warnings
 * @param infoTotal - total number of infos
 */
Generates a count message that can be used in a header or summary link based on total amount of errors, warnings,
and info messages totals passed in
@param errorTotal - total number of errors
@param warningTotal - total number of warnings
@param infoTotal - total number of infos
Generates a count message that can be used in a header or summary link based on total amount of errors warnings and info messages totals passed in @param errorTotal - total number of errors @param warningTotal - total number of warnings @param infoTotal - total number of infos
function generateCountString(errorTotal, warningTotal, infoTotal) {
    var countMessage = "";
    if (errorTotal == 1) {
        countMessage = getMessage(kradVariables.MESSAGE_TOTAL_ERROR, null, null, errorTotal);
    }
    else {
        countMessage = getMessage(kradVariables.MESSAGE_TOTAL_ERRORS, null, null, errorTotal);
    }
    if ((errorTotal > 0) + (warningTotal > 0) + (infoTotal > 0) == 3) {
        countMessage = getMessage(kradVariables.MESSAGE_TOTAL_OTHER_MESSAGES, null, null, countMessage, (warningTotal + infoTotal));
    }
    else {
        if (warningTotal) {
            if (errorTotal == 0) {
                countMessage = "";
            }
            if (countMessage != "") {
                countMessage = countMessage + " & ";
            }
            if (warningTotal == 1) {
                countMessage = countMessage + getMessage(kradVariables.MESSAGE_TOTAL_WARNING, null, null, warningTotal);
            }
            else {
                countMessage = countMessage + getMessage(kradVariables.MESSAGE_TOTAL_WARNINGS, null, null, warningTotal);
            }
        }
        if (infoTotal) {
            if (errorTotal == 0) {
                countMessage = "";
            }
            if (countMessage != "") {
                countMessage = countMessage + " & ";
            }
            if (infoTotal == 1) {
                if (jQuery("#uLookupResults").children().length > 0) {
                    if (countMessage != "") {
                        countMessage = countMessage + getMessage(kradVariables.MESSAGE_TOTAL_MESSAGES, null, null, infoTotal);
                    }
                } else {
                    countMessage = countMessage + getMessage(kradVariables.MESSAGE_TOTAL_MESSAGES, null, null, infoTotal);
                }
            }
            else {
                countMessage = countMessage + getMessage(kradVariables.MESSAGE_TOTAL_MESSAGES, null, null, infoTotal);
            }
        }
    }
    return countMessage;
}
function generateCountString ( errorTotal , warningTotal , infoTotal ) { var countMessage = "" ; if ( errorTotal == 1 ) { countMessage = getMessage ( kradVariables . MESSAGE_TOTAL_ERROR , null , null , errorTotal ) ; } else { countMessage = getMessage ( kradVariables . MESSAGE_TOTAL_ERRORS , null , null , errorTotal ) ; } if ( ( errorTotal > 0 ) + ( warningTotal > 0 ) + ( infoTotal > 0 ) == 3 ) { countMessage = getMessage ( kradVariables . MESSAGE_TOTAL_OTHER_MESSAGES , null , null , countMessage , ( warningTotal + infoTotal ) ) ; } else { if ( warningTotal ) { if ( errorTotal == 0 ) { countMessage = "" ; } if ( countMessage != "" ) { countMessage = countMessage + " & " ; } if ( warningTotal == 1 ) { countMessage = countMessage + getMessage ( kradVariables . MESSAGE_TOTAL_WARNING , null , null , warningTotal ) ; } else { countMessage = countMessage + getMessage ( kradVariables . MESSAGE_TOTAL_WARNINGS , null , null , warningTotal ) ; } } if ( infoTotal ) { if ( errorTotal == 0 ) { countMessage = "" ; } if ( countMessage != "" ) { countMessage = countMessage + " & " ; } if ( infoTotal == 1 ) { if ( jQuery ( "#uLookupResults" ) . children ( ) . length > 0 ) { if ( countMessage != "" ) { countMessage = countMessage + getMessage ( kradVariables . MESSAGE_TOTAL_MESSAGES , null , null , infoTotal ) ; } } else { countMessage = countMessage + getMessage ( kradVariables . MESSAGE_TOTAL_MESSAGES , null , null , infoTotal ) ; } } else { countMessage = countMessage + getMessage ( kradVariables . MESSAGE_TOTAL_MESSAGES , null , null , infoTotal ) ; } } } return countMessage ; }
Generates a count message that can be used in a header or summary link based on total amount of errors, warnings,
 and info messages totals passed in
 @param errorTotal - total number of errors
 @param warningTotal - total number of warnings
 @param infoTotal - total number of infos
Generates a count message that can be used in a header or summary link based on total amount of errors warnings and info messages totals passed in @param errorTotal - total number of errors @param warningTotal - total number of warnings @param infoTotal - total number of infos
//              Check to see if the info message is coming from a lookup result page. If it is, do not add single
 //              messages to the top of the page unless there are other messages to display as well.
