Class NotificationBehavior

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String METHOD  
      • Fields inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior

        method, options, selector
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected String $​(Serializable message, String level)
      Gets the jQuery statement that logs the message
      Warning: This method is *not* called by the behavior directly (only JQueryBehavior.$() is).
      protected CharSequence format​(CharSequence message, String level)
      Formats the message (escaping, etc)
      void hide​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Hides all notifications
      void show​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, Serializable message, String level)
      Shows the message
      • Methods inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior

        $, $, $, $, beforeRender, detach, getMethod, getOption, getOptions, getSelector, off, on, on, register, remove, setOption, setOption, setOption, setOptions, setSelector
      • Methods inherited from class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior

        add, getJQueryLibrarySettings, renderOnDomReadyScript, renderPriorityHeaderItem, toString
      • Methods inherited from class org.apache.wicket.behavior.Behavior

        afterRender, bind, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onEvent, onException, onRemove, onTag, unbind
    • Constructor Detail

      • NotificationBehavior

        public NotificationBehavior​(String selector)
        Constructor
        Parameters:
        selector - the html selector (ie: "#myId")
      • NotificationBehavior

        public NotificationBehavior​(String selector,
                                    com.googlecode.wicket.jquery.core.Options options)
        Constructor
        Parameters:
        selector - the html selector (ie: "#myId")
        options - the Options
    • Method Detail

      • show

        public void show​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler,
                         Serializable message,
                         String level)
        Shows the message
        Parameters:
        handler - the IPartialPageRequestHandler
        message - the message to format
        level - the level, ie: info, success, warning, error
      • hide

        public void hide​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Hides all notifications
        Parameters:
        handler - the IPartialPageRequestHandler
      • format

        protected CharSequence format​(CharSequence message,
                                      String level)
        Formats the message (escaping, etc)
        Parameters:
        message - the message to format
        level - the level, ie: info, success, warning, error
        Returns:
        the formated message
      • $

        protected final String $​(Serializable message,
                                 String level)
        Gets the jQuery statement that logs the message
        Warning: This method is *not* called by the behavior directly (only JQueryBehavior.$() is).
        Parameters:
        message - the message to log
        level - the level of the message
        Returns:
        the jQuery statement