rice-framework/krad-web/src/main/webapp/krad/scripts/krad.actions.js
/**
 * Target a single group for client validation, and do not bubble error messages up
 *
 * @param $group jQuery object representing the group to be targetted
 * @returns boolean true if the group's fields are valid, false otherwise
 */
Target a single group for client validation, and do not bubble error messages up

@param $group jQuery object representing the group to be targetted
@returns boolean true if the group's fields are valid, false otherwise
Target a single group for client validation and do not bubble error messages up @param $group jQuery object representing the group to be targetted @returns boolean true if the group ' s fields are valid false otherwise
function _validateGroupOnly($group) {
    var id = $group.attr("id");
    var parentId = $group.attr("data-" + kradVariables.PARENT_DATA_ATTRIBUTE);
    $group.removeAttr("data-" + kradVariables.PARENT_DATA_ATTRIBUTE);
    var $groupControls = $group.find("[data-role='Control']");
    if ($groupControls.length === 0) {
        return true;
    }
    var validGroup = $groupControls.valid();
    $group.find("div[data-role='InputField']").each(function () {
        var id = jQuery(this).attr("id");
        var field = jQuery("#" + id);
        var data = getValidationData(field);
        var parent = field.data(kradVariables.PARENT_DATA_ATTRIBUTE);
        handleMessagesAtGroup(parent, id, data, true);
    });
    clientErrorExistsCheck = false;
    messageSummariesShown = true;
    var validationData = getValidationData($group, true);
    if (validationData) {
        var messageMap = validationData.messageMap;
        if (!messageMap) {
            messageMap = {};
            validationData.messageMap = messageMap;
        }
    }
    writeMessagesForChildGroups(id);
    writeMessagesForGroup(id, validationData, true, false);
    displayHeaderMessageCount(id, validationData);
    $group.find(".uif-errorMessageItem > div").show();
    pageValidationPhase = false;
    if (parentId) {
        $group.attr("data-" + kradVariables.PARENT_DATA_ATTRIBUTE, parentId);
    }
    return validGroup;
}
function _validateGroupOnly ( $group ) { var id = $group . attr ( "id" ) ; var parentId = $group . attr ( "data-" + kradVariables . PARENT_DATA_ATTRIBUTE ) ; $group . removeAttr ( "data-" + kradVariables . PARENT_DATA_ATTRIBUTE ) ; var $groupControls = $group . find ( "[data-role='Control']" ) ; if ( $groupControls . length === 0 ) { return true ; } var validGroup = $groupControls . valid ( ) ; $group . find ( "div[data-role='InputField']" ) . each ( function ( ) { var id = jQuery ( this ) . attr ( "id" ) ; var field = jQuery ( "#" + id ) ; var data = getValidationData ( field ) ; var parent = field . data ( kradVariables . PARENT_DATA_ATTRIBUTE ) ; handleMessagesAtGroup ( parent , id , data , true ) ; } ) ; clientErrorExistsCheck = false ; messageSummariesShown = true ; var validationData = getValidationData ( $group , true ) ; if ( validationData ) { var messageMap = validationData . messageMap ; if ( ! messageMap ) { messageMap = { } ; validationData . messageMap = messageMap ; } } writeMessagesForChildGroups ( id ) ; writeMessagesForGroup ( id , validationData , true , false ) ; displayHeaderMessageCount ( id , validationData ) ; $group . find ( ".uif-errorMessageItem > div" ) . show ( ) ; pageValidationPhase = false ; if ( parentId ) { $group . attr ( "data-" + kradVariables . PARENT_DATA_ATTRIBUTE , parentId ) ; } return validGroup ; }
Target a single group for client validation, and do not bubble error messages up
Target a single group for client validation and do not bubble error messages up
// Handle field message bubbling manually, but do not write messages out yet
 // Toggle the flag back to default
 // Message summaries are going to be shown
 // Finally, write the result of the validation messages
 // Turn off page validation phase flag to return to normal validation processing
 // Restore parent id if one exists, by default dialog groups do not have a parent id
