T
- the type of the model objectpublic abstract class AbstractDialog<T extends Serializable> extends JQueryPanel
IJQueryWidget.JQueryWidget
Modifier and Type | Field and Description |
---|---|
static String |
LBL_CANCEL |
static String |
LBL_CLOSE |
static String |
LBL_NO |
static String |
LBL_OK |
static String |
LBL_SUBMIT |
static String |
LBL_YES |
options
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 text)
Finds a
DialogButton - identified by its text - within the list of buttons returned by getButtons() |
protected List<DialogButton> |
getButtons()
Gets the dialog's buttons.
It is allowed to return a predefined list (ie: DialogButtons#OK_CANCEL#toList()) as long as the buttons state (enable and/or visible) are not modified Warning: It is not legal to create the buttons to be returned in this method. |
org.apache.wicket.model.IModel<T> |
getModel()
Gets the model
|
T |
getModelObject()
Gets the model object
|
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()
Indicated whether the dialog is resizable
|
protected 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 |
DialogBehavior |
newWidgetBehavior(String selector) |
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(JQueryBehavior behavior) |
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 |
setModelObject(T object)
Sets the model object
|
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
|
onBeforeRender
getWebPage, getWebRequest, getWebResponse, getWebSession
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, 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, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, 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 LBL_OK
public static final String LBL_NO
public static final String LBL_YES
public static final String LBL_CLOSE
public static final String LBL_CANCEL
public static final 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.Component
public void onConfigure(JQueryBehavior behavior)
onConfigure
in interface IJQueryWidget
onConfigure
in class JQueryPanel
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 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 org.apache.wicket.model.IModel<T> getModel()
public T getModelObject()
public void setModelObject(T object)
object
- the typed model objectpublic DialogButton findButton(String text)
DialogButton
- identified by its text - within the list of buttons returned by getButtons()
text
- the button's textDialogButton
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 IJQueryWidget
IJQueryWidget.newWidgetBehavior(String)
protected 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
public void onClose(org.apache.wicket.ajax.AjaxRequestTarget target, DialogButton button)
target
- the AjaxRequestTarget
button
- the button that closed the dialogCopyright © 2014 7thWeb. All Rights Reserved.