Class NotificationBehavior
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
-
- com.googlecode.wicket.jquery.core.JQueryBehavior
-
- com.googlecode.wicket.kendo.ui.KendoUIBehavior
-
- com.googlecode.wicket.kendo.ui.widget.notification.NotificationBehavior
-
- All Implemented Interfaces:
KendoDestroyListener.IDestroyable
,Serializable
,org.apache.wicket.IComponentAwareEventSink
,org.apache.wicket.markup.html.IComponentAwareHeaderContributor
,org.apache.wicket.util.io.IClusterable
public class NotificationBehavior extends KendoUIBehavior
Provides a "kendoNotification" behavior- Since:
- 6.15.0
- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NotificationBehavior(String selector)
ConstructorNotificationBehavior(String selector, com.googlecode.wicket.jquery.core.Options options)
Constructor
-
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 (onlyJQueryBehavior.$()
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 notificationsvoid
show(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, Serializable message, String level)
Shows the message-
Methods inherited from class com.googlecode.wicket.kendo.ui.KendoUIBehavior
add, destroy, onConfigure, onDestroy, renderHead, widget, widget, widget, widget
-
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
-
-
-
-
Field Detail
-
METHOD
public static final String METHOD
- See Also:
- Constant Field Values
-
-
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
- theOptions
-
-
Method Detail
-
show
public void show(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, Serializable message, String level)
Shows the message- Parameters:
handler
- theIPartialPageRequestHandler
message
- the message to formatlevel
- the level, ie: info, success, warning, error
-
hide
public void hide(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Hides all notifications- Parameters:
handler
- theIPartialPageRequestHandler
-
format
protected CharSequence format(CharSequence message, String level)
Formats the message (escaping, etc)- Parameters:
message
- the message to formatlevel
- 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 (onlyJQueryBehavior.$()
is).- Parameters:
message
- the message to loglevel
- the level of the message- Returns:
- the jQuery statement
-
-