rice-framework/krad-web/src/main/webapp/krad/scripts/krad.validate.js
/**
 * Generate the message list items based on the content of the messageArray passed in.  Returns the html for the li
 * elements generated.
 * @param messageArray - array of messages to generate list items for
 * @param itemClass - class to apply to each li item generated
 * @param startIndex - where to start in the array passed in for generation, normally 0
 * @param focusable - whether or not this li element should be focusable by the user
 * @param image - the image to use at the beginning of each li element
 */
Generate the message list items based on the content of the messageArray passed in.  Returns the html for the li
elements generated.
Generate the message list items based on the content of the messageArray passed in . Returns the html for the li elements generated .
function generateListItems(messageArray, itemClass, startIndex, focusable, image, editLink) {
    var elements = "";
    if (!image) {
        image = "";
    }
    if (!editLink) {
        editLink = "";
    }
    if (messageArray && messageArray.length) {
        for (var i = startIndex; i < messageArray.length; i++) {
            if (focusable) {
                elements = elements + "<li tabindex='0' class='" + itemClass + "'>" + image + " "
                        + convertToHtml(messageArray[i]) + editLink + "</li>";
            }
            else {
                elements = elements + "<li class='" + itemClass + "'>" + image + " "
                        + convertToHtml(messageArray[i]) + editLink + "</li>";
            }
        }
    }
    return elements;
}
function generateListItems ( messageArray , itemClass , startIndex , focusable , image , editLink ) { var elements = "" ; if ( ! image ) { image = "" ; } if ( ! editLink ) { editLink = "" ; } if ( messageArray && messageArray . length ) { for ( var i = startIndex ; i < messageArray . length ; i ++ ) { if ( focusable ) { elements = elements + "<li tabindex='0' class='" + itemClass + "'>" + image + " " + convertToHtml ( messageArray [ i ] ) + editLink + "</li>" ; } else { elements = elements + "<li class='" + itemClass + "'>" + image + " " + convertToHtml ( messageArray [ i ] ) + editLink + "</li>" ; } } } return elements ; }
Generate the message list items based on the content of the messageArray passed in.
Generate the message list items based on the content of the messageArray passed in .