Class JcmsToastr

java.lang.Object
com.jalios.jcms.context.JcmsToastr

public class JcmsToastr extends Object
Wrapper class for toastr(s) to be displayed to the user in the GUI. Example, when used inside any Java Bean or FormHandler extending JcmsContext or any of its subclass ( JcmsJspContext, JcmsFormHandler...) :
 addMsg( new JcmsToastr("jcmsplugin.myplugin.msg") );
 
Example when used in any other class :
 JcmsContext.addToastr(request, new JcmsToastr(JcmsUtil.glp(userLang, "jcmsplugin.myplugin.msg")) );
 
Since:
jcms-10.0.0
  • Constructor Details

    • JcmsToastr

      public JcmsToastr(String message)
      Create a new JcmsToastr with the specified message
      Parameters:
      message - the message, must already be I18Ned
    • JcmsToastr

      public JcmsToastr(MessageLevel level, String message, Map<String,String> optionMap)
      Create a new JcmsToastr with the specified JcmsMessage.Level, message, url and optionMap
      Parameters:
      level - MessageLevel of the message
      message - The message
      optionMap - Map of options :
                "closeButton": "false",
                "debug": "false",
                "newestOnTop": "false",
                "progressBar": "false",
                "positionClass": "toast-top-right",
                (toast-bottom-right, toast-bottom-left, toast-top-left, toast-top-full-width,
                toast-bottom-full-width, toast-top-center, toast-bottom-center)
                "preventDuplicates": "false",
                "url": "www.google.fr", 
                "showDuration": "300",
                "hideDuration": "1000",
                "timeOut": "5000",
                "extendedTimeOut": "1000",
                "showEasing": "swing",
                "hideEasing": "linear",
                "showMethod": "fadeIn",
                "hideMethod": "fadeOut"
                
  • Method Details