Package com.jalios.jcms.context
Class JcmsToastr
java.lang.Object
com.jalios.jcms.context.JcmsToastr
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 Summary
ConstructorsConstructorDescriptionJcmsToastr(MessageLevel level, String message, Map<String, String> optionMap) Create a newJcmsToastrwith the specifiedJcmsMessage.Level, message, url and optionMapJcmsToastr(String message) Create a new JcmsToastr with the specified message -
Method Summary
Modifier and TypeMethodDescriptionbooleangetLevel()inthashCode()setLevel(MessageLevel level) setMessage(String message) setOptionMap(Map<String, ? extends Object> optionMap)
-
Constructor Details
-
JcmsToastr
Create a new JcmsToastr with the specified message- Parameters:
message- the message, must already be I18Ned
-
JcmsToastr
Create a newJcmsToastrwith the specifiedJcmsMessage.Level, message, url and optionMap- Parameters:
level-MessageLevelof the messagemessage- The messageoptionMap-Mapof 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