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(String selector)
Constructor
|
DialogBehavior(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 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, setSelector
add, getJQueryLibrarySettings, getToken, renderScript, toString
public DialogBehavior(String selector)
selector
- the html selector (ie: "#myId")protected abstract List<DialogButton> getButtons()
public void bind(org.apache.wicket.Component component)
bind
in class org.apache.wicket.behavior.Behavior
public void open(org.apache.wicket.ajax.AjaxRequestTarget target)
target
- the AjaxRequestTarget
public void close(org.apache.wicket.ajax.AjaxRequestTarget target)
target
- the AjaxRequestTarget
public void onConfigure(org.apache.wicket.Component component)
onConfigure
in class JQueryUIBehavior
public void onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, JQueryEvent event)
onAjax
in interface IJQueryAjaxAware
protected 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.ClickEvent
ButtonAjaxBehavior
protected JQueryAjaxBehavior newDefaultCloseBehavior()
JQueryAjaxBehavior
protected JQueryAjaxBehavior newEscapeCloseBehavior()
JQueryAjaxBehavior
public boolean isDefaultCloseEventEnabled()
onClose(AjaxRequestTarget, DialogButton)
event will be triggered, with a null DialogButton
public boolean isEscapeCloseEventEnabled()
onClose(AjaxRequestTarget, DialogButton)
event will be triggered, with a null DialogButton
public void onClick(org.apache.wicket.ajax.AjaxRequestTarget target, DialogButton button)
super.onClick(event)
or close(AjaxRequestTarget)
is called.target
- the AjaxRequestTarget
button
- the button that closed the dialogpublic void onClose(org.apache.wicket.ajax.AjaxRequestTarget target, DialogButton button)
target
- the AjaxRequestTarget
button
- the button that closed the dialogCopyright © 2015 7thWeb. All Rights Reserved.