T
- the type of the model objectpublic abstract class AbstractDialog<T extends Serializable>
extends org.apache.wicket.markup.html.panel.GenericPanel<T>
implements com.googlecode.wicket.jquery.core.IJQueryWidget
Modifier and Type | Field and Description |
---|---|
static String |
CANCEL |
static String |
CLOSE |
static org.apache.wicket.model.IModel<String> |
LBL_CANCEL |
static org.apache.wicket.model.IModel<String> |
LBL_CLOSE |
static org.apache.wicket.model.IModel<String> |
LBL_NO |
static org.apache.wicket.model.IModel<String> |
LBL_OK |
static org.apache.wicket.model.IModel<String> |
LBL_SUBMIT |
static org.apache.wicket.model.IModel<String> |
LBL_YES |
static String |
NO |
static String |
OK |
static String |
SUBMIT |
static String |
YES |
ENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING
Constructor and Description |
---|
AbstractDialog(String id,
org.apache.wicket.model.IModel<String> title)
Constructor
|
AbstractDialog(String id,
org.apache.wicket.model.IModel<String> title,
boolean modal)
Constructor
|
AbstractDialog(String id,
org.apache.wicket.model.IModel<String> title,
org.apache.wicket.model.IModel<T> model)
Constructor
|
AbstractDialog(String id,
org.apache.wicket.model.IModel<String> title,
org.apache.wicket.model.IModel<T> model,
boolean modal)
Constructor
|
AbstractDialog(String id,
String title)
Constructor
|
AbstractDialog(String id,
String title,
boolean modal)
Constructor
|
AbstractDialog(String id,
String title,
org.apache.wicket.model.IModel<T> model)
Constructor
|
AbstractDialog(String id,
String title,
org.apache.wicket.model.IModel<T> model,
boolean modal)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close(org.apache.wicket.ajax.AjaxRequestTarget target,
DialogButton button)
Closes the dialogs in ajax.
|
DialogButton |
findButton(String name)
Finds a
DialogButton - identified by its name - within the list of buttons returned by getButtons() |
protected List<DialogButton> |
getButtons()
Gets the dialog's buttons.
|
org.apache.wicket.model.IModel<String> |
getTitle()
Gets the dialog's title
|
int |
getWidth()
Gets the dialog's with
|
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 |
boolean |
isModal()
Gets the modal flag
|
boolean |
isResizable()
Indicates whether the dialog is resizable
|
protected ButtonAjaxBehavior |
newButtonAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source,
DialogButton button)
Gets a new
ButtonAjaxBehavior that will be called by the corresponding DialogButton . |
DialogBehavior |
newWidgetBehavior(String selector) |
void |
onBeforeRender(com.googlecode.wicket.jquery.core.JQueryBehavior behavior) |
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(com.googlecode.wicket.jquery.core.JQueryBehavior behavior) |
protected void |
onDetach() |
protected void |
onInitialize() |
protected void |
onOpen(org.apache.wicket.ajax.AjaxRequestTarget target)
Triggered when the dialog opens
|
void |
open(org.apache.wicket.ajax.AjaxRequestTarget target)
Opens the dialogs in ajax.
|
void |
setTitle(org.apache.wicket.ajax.AjaxRequestTarget target,
org.apache.wicket.model.IModel<String> title)
Sets the dialog's title dynamically
|
void |
setTitle(org.apache.wicket.ajax.AjaxRequestTarget target,
String title)
Sets the dialog's title dynamically
|
void |
setTitle(org.apache.wicket.model.IModel<String> title)
Sets the dialog's title
|
getModel, getModelObject, setModel, setModelObject
getRegionMarkup, newMarkupSourcingStrategy
getWebPage, getWebRequest, getWebResponse, getWebSession
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
public static final String OK
public static final String NO
public static final String YES
public static final String CLOSE
public static final String CANCEL
public static final String SUBMIT
public static final org.apache.wicket.model.IModel<String> LBL_OK
public static final org.apache.wicket.model.IModel<String> LBL_NO
public static final org.apache.wicket.model.IModel<String> LBL_YES
public static final org.apache.wicket.model.IModel<String> LBL_CLOSE
public static final org.apache.wicket.model.IModel<String> LBL_CANCEL
public static final org.apache.wicket.model.IModel<String> LBL_SUBMIT
public AbstractDialog(String id, String title)
id
- the markupId, an html div suffice to host a dialog.title
- the title of the dialogpublic AbstractDialog(String id, org.apache.wicket.model.IModel<String> title)
id
- the markupId, an html div suffice to host a dialog.title
- the title of the dialogpublic AbstractDialog(String id, String title, org.apache.wicket.model.IModel<T> model)
id
- the markupId, an html div suffice to host a dialog.title
- the title of the dialogmodel
- the model to be used in the dialog.public AbstractDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<T> model)
id
- the markupId, an html div suffice to host a dialog.title
- the title of the dialogmodel
- the model to be used in the dialog.public AbstractDialog(String id, String title, boolean modal)
id
- the markupId, an html div suffice to host a dialog.title
- the title of the dialogmodal
- indicates whether the dialog is modalpublic AbstractDialog(String id, org.apache.wicket.model.IModel<String> title, boolean modal)
id
- the markupId, an html div suffice to host a dialog.title
- the title of the dialogmodal
- indicates whether the dialog is modalpublic AbstractDialog(String id, String title, org.apache.wicket.model.IModel<T> model, boolean modal)
id
- markupId, an html div suffice to host a dialog.title
- the title of the dialogmodal
- indicates whether the dialog is modalmodel
- the model to be used in the dialogpublic AbstractDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<T> model, boolean modal)
id
- markupId, an html div suffice to host a dialog.title
- the title of the dialogmodal
- indicates whether the dialog is modalmodel
- the model to be used in the dialogprotected void onInitialize()
onInitialize
in class org.apache.wicket.MarkupContainer
public void onConfigure(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
onConfigure
in interface com.googlecode.wicket.jquery.core.IJQueryWidget
public void onBeforeRender(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
onBeforeRender
in interface com.googlecode.wicket.jquery.core.IJQueryWidget
protected void onOpen(org.apache.wicket.ajax.AjaxRequestTarget target)
target
- the AjaxRequestTarget
public void onClick(org.apache.wicket.ajax.AjaxRequestTarget target, DialogButton button)
super.onClick(event)
or close(AjaxRequestTarget, DialogButton)
is called.target
- the AjaxRequestTarget
button
- the button that closed the dialogprotected void onDetach()
onDetach
in class org.apache.wicket.MarkupContainer
protected List<DialogButton> getButtons()
btnOk
by defaultpublic int getWidth()
WIDTH
by defaultpublic org.apache.wicket.model.IModel<String> getTitle()
public void setTitle(org.apache.wicket.model.IModel<String> title)
title
- the dialog's titlepublic void setTitle(org.apache.wicket.ajax.AjaxRequestTarget target, String title)
target
- the AjaxRequestTarget
title
- the dialog's titlepublic void setTitle(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.model.IModel<String> title)
target
- the AjaxRequestTarget
title
- the dialog's titlepublic boolean isModal()
public boolean isResizable()
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 DialogButton findButton(String name)
DialogButton
- identified by its name - within the list of buttons returned by getButtons()
name
- the button's nameDialogButton
if found, null otherwisepublic final void open(org.apache.wicket.ajax.AjaxRequestTarget target)
target
- the AjaxRequestTarget
public final void close(org.apache.wicket.ajax.AjaxRequestTarget target, DialogButton button)
target
- the AjaxRequestTarget
button
- the button that closes the dialogpublic DialogBehavior newWidgetBehavior(String selector)
newWidgetBehavior
in interface com.googlecode.wicket.jquery.core.IJQueryWidget
IJQueryWidget.newWidgetBehavior(String)
protected ButtonAjaxBehavior newButtonAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.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
public 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.