public abstract class DialogBehavior extends JQueryUIBehavior implements IJQueryAjaxAware
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DialogBehavior.CloseEvent
An event object that will be broadcasted when the user clicks on the X-icon
|
method, options, selector| Constructor and Description |
|---|
DialogBehavior(java.lang.String selector)
Constructor
|
DialogBehavior(java.lang.String selector,
Options options)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(org.apache.wicket.Component component) |
void |
close(org.apache.wicket.ajax.AjaxRequestTarget target)
Closes the dialogs in ajax.
|
protected abstract java.util.List<DialogButton> |
getButtons()
Gets the dialog's buttons.
|
boolean |
isDefaultCloseEventEnabled()
Indicates whether the default close event (the click on the X-icon) is enabled
If true, the
onClose(AjaxRequestTarget, DialogButton) event will be triggered, with a null DialogButton |
boolean |
isEscapeCloseEventEnabled()
Indicates whether the escape close event (pressing escape key) is enabled
If true, the
onClose(AjaxRequestTarget, DialogButton) event will be triggered, with a null DialogButton |
protected abstract ButtonAjaxBehavior |
newButtonAjaxBehavior(IJQueryAjaxAware source,
DialogButton button)
Gets a new
ButtonAjaxBehavior that will be called by the corresponding DialogButton.This method may be overridden to provide additional behaviors |
protected JQueryAjaxBehavior |
newDefaultCloseBehavior()
Gets the ajax behavior that will be triggered when the user clicks on the X-icon
|
protected JQueryAjaxBehavior |
newEscapeCloseBehavior()
Gets the ajax behavior that will be triggered when the user press the escape key
|
void |
onAjax(org.apache.wicket.ajax.AjaxRequestTarget target,
JQueryEvent event) |
void |
onClick(org.apache.wicket.ajax.AjaxRequestTarget target,
DialogButton button)
Triggered when a button is clicked.
|
void |
onClose(org.apache.wicket.ajax.AjaxRequestTarget target,
DialogButton button)
Triggered when the dialog closes.
|
void |
onConfigure(org.apache.wicket.Component component) |
void |
open(org.apache.wicket.ajax.AjaxRequestTarget target)
Opens the dialogs in ajax.
|
$, $, $, beforeRender, getMethod, getOption, getOptions, getSelector, on, on, on, renderHead, setOption, setOption, setOption, setOptions, setSelectoradd, getJQueryLibrarySettings, getToken, renderScript, toStringpublic DialogBehavior(java.lang.String selector)
selector - the html selector (ie: "#myId")protected abstract java.util.List<DialogButton> getButtons()
List of Buttonpublic void bind(org.apache.wicket.Component component)
bind in class org.apache.wicket.behavior.Behaviorpublic void open(org.apache.wicket.ajax.AjaxRequestTarget target)
target - the AjaxRequestTargetpublic void close(org.apache.wicket.ajax.AjaxRequestTarget target)
target - the AjaxRequestTargetpublic void onConfigure(org.apache.wicket.Component component)
onConfigure in class JQueryUIBehaviorpublic void onAjax(org.apache.wicket.ajax.AjaxRequestTarget target,
JQueryEvent event)
onAjax in interface IJQueryAjaxAwareprotected abstract ButtonAjaxBehavior newButtonAjaxBehavior(IJQueryAjaxAware source, DialogButton button)
ButtonAjaxBehavior that will be called by the corresponding DialogButton.source - the IJQueryAjaxAware sourcebutton - the button that is passed to the behavior so it can be retrieved via the ButtonAjaxBehavior.ClickEventButtonAjaxBehaviorprotected JQueryAjaxBehavior newDefaultCloseBehavior()
JQueryAjaxBehaviorprotected JQueryAjaxBehavior newEscapeCloseBehavior()
JQueryAjaxBehaviorpublic boolean isDefaultCloseEventEnabled()
onClose(AjaxRequestTarget, DialogButton) event will be triggered, with a null DialogButtonpublic boolean isEscapeCloseEventEnabled()
onClose(AjaxRequestTarget, DialogButton) event will be triggered, with a null DialogButtonpublic void onClick(org.apache.wicket.ajax.AjaxRequestTarget target,
DialogButton button)
super.onClick(event) or close(AjaxRequestTarget) is called.target - the AjaxRequestTargetbutton - the button that closed the dialogpublic void onClose(org.apache.wicket.ajax.AjaxRequestTarget target,
DialogButton button)
target - the AjaxRequestTargetbutton - the button that closed the dialogCopyright © 2014 7thWeb. All Rights Reserved.