public class Modal
extends org.apache.wicket.markup.html.panel.Panel
Modal dialog is a simple component with header,
footer and body.| Modifier and Type | Field and Description |
|---|---|
static String |
BUTTON_MARKUP_ID |
| Constructor and Description |
|---|
Modal(String markupId)
Constructor.
|
Modal(String id,
org.apache.wicket.model.IModel<String> model)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Modal |
addButton(org.apache.wicket.Component button)
adds a button to footer section.
|
Modal |
addCloseButton()
adds a close button with default label ("Close")
|
Modal |
addCloseButton(org.apache.wicket.model.IModel<String> label)
adds a close button with specific label
|
Modal |
addOpenerAttributesTo(org.apache.wicket.Component component) |
Modal |
appendCloseDialogJavaScript(org.apache.wicket.ajax.AjaxRequestTarget target) |
Modal |
appendShowDialogJavaScript(org.apache.wicket.ajax.AjaxRequestTarget target) |
protected String |
createActionScript(String markupId,
String action)
creates an action script to open/close the dialog on client side.
|
protected String |
createBasicInitializerScript(String markupId)
creates the basic initialization script of the modal dialog.
|
Modal |
header(org.apache.wicket.model.IModel<String> label)
Sets the header label text.
|
Modal |
header(org.apache.wicket.model.IModel<String> label,
boolean escapeMarkup)
Sets the header label text and whether model strings should be escaped.
|
protected void |
onClose(org.apache.wicket.ajax.AjaxRequestTarget target)
hook to react on modal close event.
|
protected void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag) |
protected void |
onConfigure() |
protected void |
onInitialize() |
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
Modal |
setFadeIn(boolean fadein)
Whether to fadin/fadeout the modal dialog or not
|
Modal |
setFooterVisible(boolean visible)
Sets whether the footer and any children are visible.
|
Modal |
setHeaderVisible(boolean visible)
Sets whether the header and any children are visible.
|
Modal |
setUseCloseHandler(boolean useCloseHandler)
Sets whether the close handler is used or not.
|
Modal |
setUseKeyboard(boolean keyboard)
Whether to enable keyboard interaction like ESC to close the dialog.
|
Modal |
show(boolean show)
Sets the initial visibility of the modal dialog.
|
protected boolean |
showImmediately() |
protected boolean |
useFadein() |
protected boolean |
useKeyboard() |
getWebPage, getWebRequest, getWebResponse, getWebSessionadd, 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, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, 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, onDetach, onEvent, onModelChanged, onModelChanging, 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, wrappublic static final String BUTTON_MARKUP_ID
public Modal(String markupId)
markupId - The non-null id of this componentprotected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
onComponentTag in class org.apache.wicket.Componentprotected void onClose(org.apache.wicket.ajax.AjaxRequestTarget target)
target - The current AjaxRequestTargetpublic Modal header(org.apache.wicket.model.IModel<String> label)
label - The header labelpublic Modal header(org.apache.wicket.model.IModel<String> label, boolean escapeMarkup)
label - The header labelescapeMarkup - True is model strings should be escapedpublic Modal setFooterVisible(boolean visible)
visible - True if footer and any children should be visiblepublic Modal setHeaderVisible(boolean visible)
visible - True if header and any children should be visiblepublic final Modal setUseCloseHandler(boolean useCloseHandler)
useCloseHandler - True if close handler should be usedpublic Modal show(boolean show)
show - Whether to show the dialog or notpublic Modal appendCloseDialogJavaScript(org.apache.wicket.ajax.AjaxRequestTarget target)
public Modal appendShowDialogJavaScript(org.apache.wicket.ajax.AjaxRequestTarget target)
protected String createActionScript(String markupId, String action)
markupId - The component's markup idaction - Possible values: show/hidepublic Modal addOpenerAttributesTo(org.apache.wicket.Component component)
public Modal addCloseButton(org.apache.wicket.model.IModel<String> label)
label - The label of close buttonpublic Modal addCloseButton()
public Modal addButton(org.apache.wicket.Component button)
button - Button to add to footerprotected void onInitialize()
onInitialize in class org.apache.wicket.Componentprotected void onConfigure()
onConfigure in class org.apache.wicket.Componentpublic void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IHeaderContributorrenderHead in class org.apache.wicket.Componentprotected String createBasicInitializerScript(String markupId)
markupId - markup idcreateInitializerScript(java.lang.String)protected final boolean useFadein()
protected final boolean useKeyboard()
protected final boolean showImmediately()
public final Modal setFadeIn(boolean fadein)
fadein - true, if dialog should be animatedpublic final Modal setUseKeyboard(boolean keyboard)
keyboard - true, if keyboard interaction is enabledCopyright © 2013 agilecoders.de. All Rights Reserved.