All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.primefaces.messages.messages.js Maven / Gradle / Ivy

There is a newer version: 14.0.0
Show newest version
/**
 * __PrimeFaces Messages Widget__
 * 
 * Messages is a pre-skinned extended version of the standard JSF messages component.
 * 
 * @interface {PrimeFaces.widget.MessagesCfg} cfg The configuration for the {@link  Messages| Messages widget}.
 * You can access this configuration via {@link PrimeFaces.widget.BaseWidget.cfg|BaseWidget.cfg}. Please note that this
 * configuration is usually meant to be read-only and should not be modified.
 * @extends {PrimeFaces.widget.BaseWidgetCfg} cfg
 */
PrimeFaces.widget.Messages = PrimeFaces.widget.BaseWidget.extend({

    /**
     * @override
     * @inheritdoc
     * @param {PrimeFaces.PartialWidgetCfg} cfg
     */
    init: function(cfg) {
        this._super(cfg);
    },

    /**
     * Creates the HTML elements for the given faces message, and adds it to the DOM.
     * @param {PrimeFaces.FacesMessage} msg A message to translate into an HTML element.
     */
    appendMessage: function(msg) {
        this.jq.append(
             '
' + '' + '' + '' + '' + '
    ' + '
  • ' + '' + (msg.summary ? msg.summary : '') + '' + '' + (msg.detail ? msg.detail : '') + '' + '
  • ' + '
' + '
'); } });




© 2015 - 2024 Weber Informatics LLC | Privacy Policy