rice-framework/krad-web/src/main/webapp/krad/scripts/krad.validate.js
/**
 * Handles the messages for a particular field at the group identified by id.  This data is bubbled up through parent
 * groups as appropriate and fieldLinks/summary links are updated to represent the new message status for the field
 * passed in.
 * @param id - the id of the group
 * @param fieldId - the id of the field with message updates
 * @param fieldData - the new validation data for the field being updated
 */
Handles the messages for a particular field at the group identified by id.  This data is bubbled up through parent
groups as appropriate and fieldLinks/summary links are updated to represent the new message status for the field
passed in.
@param id - the id of the group
@param fieldId - the id of the field with message updates
@param fieldData - the new validation data for the field being updated
Handles the messages for a particular field at the group identified by id . This data is bubbled up through parent groups as appropriate and fieldLinks / summary links are updated to represent the new message status for the field passed in . @param id - the id of the group @param fieldId - the id of the field with message updates @param fieldData - the new validation data for the field being updated
function handleMessagesAtGroup(id, fieldId, fieldData, pageSetupPhase) {
    var group = jQuery("#" + id);
    var data = getValidationData(group, true);
    var pageLevel = false;
    var parent = group.data("parent");
    if (data) {
        var messageMap = data.messageMap;
        pageLevel = data.pageLevel;
        if (!data.errors) {
            data.errors = [];
        }
        if (!data.warnings) {
            data.warnings = [];
        }
        if (!data.info) {
            data.info = [];
        }
        if (!messageMap) {
            messageMap = {};
            data.messageMap = messageMap;
        }
        if (data.isSection === undefined) {
            var sectionHeader = getGroupHeaderElement(id);
            data.isSection = sectionHeader.length;
        }
        messageMap[fieldId] = fieldData;
        if (!pageSetupPhase) {
            var forceWrite = jQuery("[data-messages_for='" + id + "']").find("li[data-messageitemfor='" + fieldId + "']").length;
            writeMessagesForGroup(id, data, forceWrite);
            displayHeaderMessageCount(id, data);
        }
    }
    if (!pageLevel && parent) {
        handleMessagesAtGroup(parent, fieldId, fieldData, pageSetupPhase);
    }
}
function handleMessagesAtGroup ( id , fieldId , fieldData , pageSetupPhase ) { var group = jQuery ( "#" + id ) ; var data = getValidationData ( group , true ) ; var pageLevel = false ; var parent = group . data ( "parent" ) ; if ( data ) { var messageMap = data . messageMap ; pageLevel = data . pageLevel ; if ( ! data . errors ) { data . errors = [ ] ; } if ( ! data . warnings ) { data . warnings = [ ] ; } if ( ! data . info ) { data . info = [ ] ; } if ( ! messageMap ) { messageMap = { } ; data . messageMap = messageMap ; } if ( data . isSection === undefined ) { var sectionHeader = getGroupHeaderElement ( id ) ; data . isSection = sectionHeader . length ; } messageMap [ fieldId ] = fieldData ; if ( ! pageSetupPhase ) { var forceWrite = jQuery ( "[data-messages_for='" + id + "']" ) . find ( "li[data-messageitemfor='" + fieldId + "']" ) . length ; writeMessagesForGroup ( id , data , forceWrite ) ; displayHeaderMessageCount ( id , data ) ; } } if ( ! pageLevel && parent ) { handleMessagesAtGroup ( parent , fieldId , fieldData , pageSetupPhase ) ; } }
Handles the messages for a particular field at the group identified by id.
Handles the messages for a particular field at the group identified by id .
//init empty params
 //retrieve header for section
 //add fresh data to group's message data based on the new field info
 //write messages for this group
