rice-framework/krad-web/src/main/webapp/krad/scripts/krad.validate.js
/**
 * Displays the message count string on the header for the section specified.  calculateMessageTotals must be called
 * before this call
 * @param sectionId - id of the section
 * @param sectionData - 'validationMessages' data of the section
 */
Displays the message count string on the header for the section specified.  calculateMessageTotals must be called
before this call
@param sectionId - id of the section
@param sectionData - 'validationMessages' data of the section
Displays the message count string on the header for the section specified . calculateMessageTotals must be called before this call @param sectionId - id of the section @param sectionData - ' validationMessages ' data of the section
function displayHeaderMessageCount(sectionId, sectionData) {
    if (sectionData && sectionData.displayHeaderSummary) {
        var sectionHeader = getGroupHeaderElement(sectionId);
        if (errorImage == undefined) {
            setupImages();
        }
        if (sectionHeader.length && sectionData.messageTotal) {
            var countMessage = generateCountString(sectionData.errorTotal, sectionData.warningTotal, sectionData.infoTotal);
            var image = "";
            if (sectionData.errorTotal) {
                image = errorImage;
            }
            else if (sectionData.warningTotal) {
                image = warningImage;
            }
            else if (sectionData.infoTotal) {
                image = infoImage;
            }
            var messageCountElement = jQuery(sectionHeader).find("." + kradVariables.MESSAGE_COUNT_CLASS);
            if (messageCountElement.length) {
                messageCountElement.remove();
            }
            if (countMessage != "") {
                jQuery("<div class='" + kradVariables.MESSAGE_COUNT_CLASS + "'>" + image + " " + countMessage + "</div>").appendTo(sectionHeader);
            }
        }
        else if (sectionHeader.length && sectionData.messageTotal == 0) {
            jQuery(sectionHeader).find("." + kradVariables.MESSAGE_COUNT_CLASS).remove();
        }
    }
}
function displayHeaderMessageCount ( sectionId , sectionData ) { if ( sectionData && sectionData . displayHeaderSummary ) { var sectionHeader = getGroupHeaderElement ( sectionId ) ; if ( errorImage == undefined ) { setupImages ( ) ; } if ( sectionHeader . length && sectionData . messageTotal ) { var countMessage = generateCountString ( sectionData . errorTotal , sectionData . warningTotal , sectionData . infoTotal ) ; var image = "" ; if ( sectionData . errorTotal ) { image = errorImage ; } else if ( sectionData . warningTotal ) { image = warningImage ; } else if ( sectionData . infoTotal ) { image = infoImage ; } var messageCountElement = jQuery ( sectionHeader ) . find ( "." + kradVariables . MESSAGE_COUNT_CLASS ) ; if ( messageCountElement . length ) { messageCountElement . remove ( ) ; } if ( countMessage != "" ) { jQuery ( "<div class='" + kradVariables . MESSAGE_COUNT_CLASS + "'>" + image + " " + countMessage + "</div>" ) . appendTo ( sectionHeader ) ; } } else if ( sectionHeader . length && sectionData . messageTotal == 0 ) { jQuery ( sectionHeader ) . find ( "." + kradVariables . MESSAGE_COUNT_CLASS ) . remove ( ) ; } } }
Displays the message count string on the header for the section specified.
Displays the message count string on the header for the section specified .