Class ModalWindow
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- org.apache.wicket.markup.html.panel.Panel
-
- org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow
-
- All Implemented Interfaces:
Serializable,Iterable<org.apache.wicket.Component>,org.apache.wicket.event.IEventSink,org.apache.wicket.event.IEventSource,org.apache.wicket.feedback.IFeedbackContributor,org.apache.wicket.IConverterLocator,org.apache.wicket.IMetadataContext<Serializable,org.apache.wicket.Component>,org.apache.wicket.IQueueRegion,org.apache.wicket.markup.html.IHeaderContributor,org.apache.wicket.request.component.IRequestableComponent,org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>,org.apache.wicket.util.io.IClusterable
public class ModalWindow extends org.apache.wicket.markup.html.panel.Panel
Deprecated.useModalDialoginsteadModal window component.Modal window is a draggable window (with either <div> when used with a Panel or <iframe> when used with a Page content) that prevent user from interacting the rest of page (using a mask) until the window is closed.
If you want this to work under IE, don't attach this component to a <span> tag, make sure you use a <div>.
The window is draggable and optionally resizable. The content can be either
- a component - you need to add the component to modal window (with id obtained using
, orgetContentId() - a page - you need to pass a
instance to aModalWindow.PageCreatormethod.setPageCreator(ModalWindow.PageCreator)
. The window can be made visible from an ajax handler usingshow(IPartialPageRequestHandler)).show(IPartialPageRequestHandler)To close the window there are multiple options. Static method
can be used to close the window from a handler of ajax link inside the window. By default the close button in the upper right corner of the window closes it. This behavior can be altered usingclose(IPartialPageRequestHandler). If you want to be notified when the window is closed (either using the close button or callingsetCloseButtonCallback(ModalWindow.CloseButtonCallback), you can useclose(IPartialPageRequestHandler)).setWindowClosedCallback(ModalWindow.WindowClosedCallback)Title is specified using
setTitle(String). Passtruetoto use unencoded markup in the title.Component.setEscapeModelStrings(boolean)
If the content is a page (iframe), the title can remain unset, in that case title from the page inside window will be shown.There are several options to specify the visual properties of the window. In all methods where size is expected, width refers to width of entire window (including frame), height refers to the height of window content (without frame).
specifies, whether the window can be resized.setResizable(boolean)andsetInitialWidth(int)specify the initial width and height of window. If the window is resizable, the unit of these dimensions is always "px". If the window is not resizable, the unit can be specified usingsetInitialHeight(int)andsetWidthUnit(String). If the window is not resizable and the content is a component (not a page), the initial height value can be ignored and the actual height can be determined from the height of the content. To enable this behavior usesetHeightUnit(String).setUseInitialHeight(boolean)- The window position (and size if the window is resizable) can be stored in a cookie, so that
it is preserved when window is close. The name of the cookie is specified via
. If the name issetCookieName(String)null, position is not stored (initial width and height are always used). Default cookie name is null (position is not stored). andsetMinimalWidth(int)set the minimal dimensions of resizable window.setMinimalHeight(int)sets whether window size will be automatically adjusted on opening to fit content's width and height. Default is false. Doesn't work on IE 6.setAutoSize(boolean)- Modal window can chose between two colors of frame.
sets the dialog css class, possible values aresetCssClassName(String)for blue frame andCSS_CLASS_BLUEfor gray frame.CSS_CLASS_GRAY - Mask (element that prevents user from interacting the rest of the page) can be either
transparent or semitransparent.
alters this.setMaskType(ModalWindow.MaskType)
If you want to use form in modal window component make sure that you put the modal window itself in another form (nesting forms is legal in Wicket) and that the form on modal window is submitted before the window get closed.
- Author:
- Matej Knopp
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classModalWindow.CloseButtonBehaviorDeprecated.static interfaceModalWindow.CloseButtonCallbackDeprecated.Callback for close button that contains a method that is invoked after the button has been clicked.static classModalWindow.MaskTypeDeprecated.Mask is the element behind the window, that prevents user from interacting the rest of page.static interfaceModalWindow.PageCreatorDeprecated.Interface for lazy page creation.static interfaceModalWindow.WindowClosedCallbackDeprecated.Callback called after the window has been closed.
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_IDDeprecated.the default id of the content componentstatic StringCSS_CLASS_BLUEDeprecated.CSS class for window with blue border.static StringCSS_CLASS_GRAYDeprecated.CSS class for window with gray border.
-
Constructor Summary
Constructors Constructor Description ModalWindow(String id)Deprecated.Creates a new modal window component.ModalWindow(String id, org.apache.wicket.model.IModel<?> model)Deprecated.Creates a new modal window component.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose(org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)Deprecated.Closes the modal window.static voidcloseCurrent(org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)Deprecated.Hides the modal window.protected StringgetCloseJavacript()Deprecated.Method that allows alternate script for closing the window.protected org.apache.wicket.ComponentgetContent()Deprecated.Returns a content component.StringgetContentId()Deprecated.Returns the id of content component.StringgetCookieName()Deprecated.Returns the name of cookie that is used to remember window position (and size if the window is resizable).StringgetCssClassName()Deprecated.Returns the CSS class name for this window.StringgetHeightUnit()Deprecated.Retrns the CSS unit for initial window height.intgetInitialHeight()Deprecated.Returns the initial height of the window.intgetInitialWidth()Deprecated.Returns the initial width of the window.ModalWindow.MaskTypegetMaskType()Deprecated.Returns the mask type of the windowintgetMinimalHeight()Deprecated.Returns the minimal height of window (in pixels).intgetMinimalWidth()Deprecated.Returns the minimal width of window (in pixels).protected CharSequencegetShowJavaScript()Deprecated.Method that allows alternate script for showing the window.org.apache.wicket.model.IModel<String>getTitle()Deprecated.Returns the title of the window.StringgetWidthUnit()Deprecated.Returns the CSS unit for initial window width.protected StringgetWindowOpenJavaScript()Deprecated.Returns the javascript used to open the window.booleanisAutoSize()Deprecated.Returns whether window will be opened in autosize mode.protected booleanisCustomComponent()Deprecated.Returns true if user has added own component to the window.booleanisResizable()Deprecated.Returns whether the window is resizable.booleanisShown()Deprecated.Is this window currently showing.booleanisUseInitialHeight()Deprecated.Returns true if the initial height should be used (in favor of preserving real content height).protected booleanmakeContentVisible()Deprecated.You may subclass this method in case you don't want to show up the window on normal page refresh.protected ModalWindow.CloseButtonBehaviornewCloseButtonBehavior()Deprecated.Gives the possibility to provide customIAjaxCallListenerprotected org.apache.wicket.request.resource.ResourceReferencenewCssResource()Deprecated.Allows to override CSS contribution.protected voidonBeforeRender()Deprecated.protected voidonComponentTag(org.apache.wicket.markup.ComponentTag tag)Deprecated.protected voidonDetach()Deprecated.Detach the 'title' modelprotected voidpostProcessSettings(com.github.openjson.JSONObject settings)Deprecated.Method that allows tweaking the settingsModalWindowremove(org.apache.wicket.Component component)Deprecated.voidrenderHead(org.apache.wicket.markup.head.IHeaderResponse response)Deprecated.ModalWindowsetAutoSize(boolean autoSize)Deprecated.Sets whether window size will be automatically adjusted on opening to fit content's width and height.ModalWindowsetCloseButtonCallback(ModalWindow.CloseButtonCallback callback)Deprecated.Sets theinstance.ModalWindow.CloseButtonCallbackModalWindowsetContent(org.apache.wicket.Component component)Deprecated.Sets the content of the modal window.ModalWindowsetCookieName(String cookieName)Deprecated.Sets the name of the cookie that is used to remember window position (and size if the window is resizable).ModalWindowsetCssClassName(String cssClassName)Deprecated.Sets the CSS class name for this window.ModalWindowsetHeightUnit(String heightUnit)Deprecated.Sets the CSS unit used for initial window height.ModalWindowsetInitialHeight(int initialHeight)Deprecated.Sets the initial height of the window.ModalWindowsetInitialWidth(int initialWidth)Deprecated.Sets the initial width of the window.ModalWindowsetMaskType(ModalWindow.MaskType mask)Deprecated.Sets the mask type of the window.ModalWindowsetMinimalHeight(int minimalHeight)Deprecated.Sets the minimal height of window.ModalWindowsetMinimalWidth(int minimalWidth)Deprecated.Sets the minimal width of window.ModalWindowsetPageCreator(ModalWindow.PageCreator creator)Deprecated.Sets theinstance.ModalWindow.PageCreatorModalWindowsetResizable(boolean resizable)Deprecated.Sets whether the user will be able to resize the window.ModalWindowsetTitle(String title)Deprecated.Sets the title of window.ModalWindowsetTitle(org.apache.wicket.model.IModel<String> title)Deprecated.Sets the title of window.ModalWindowsetUseInitialHeight(boolean useInitialHeight)Deprecated.Sets whether to use initial height or preserve the real content height.ModalWindowsetWidthUnit(String widthUnit)Deprecated.Sets the CSS unit used for initial window width.ModalWindowsetWindowClosedCallback(ModalWindow.WindowClosedCallback callback)Deprecated.Sets the@{linkinstance.ModalWindow.WindowClosedCallbackvoidshow(org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)Deprecated.Shows the modal window.booleanshowUnloadConfirmation()Deprecated.Returns whether the user should be asked before leaving the page.ModalWindowshowUnloadConfirmation(boolean unloadConfirmation)Deprecated.Sets a flag whether to ask the user before leaving the page.-
Methods inherited from class org.apache.wicket.markup.html.panel.Panel
getRegionMarkup, newMarkupSourcingStrategy
-
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
-
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onInitialize, onRender, queue, remove, removeAll, renderAll, renderAssociatedMarkup, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, 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, getMarkupTag, 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, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
CSS_CLASS_BLUE
public static final String CSS_CLASS_BLUE
Deprecated.CSS class for window with blue border.- See Also:
- Constant Field Values
-
CSS_CLASS_GRAY
public static final String CSS_CLASS_GRAY
Deprecated.CSS class for window with gray border.- See Also:
- Constant Field Values
-
CONTENT_ID
public static final String CONTENT_ID
Deprecated.the default id of the content component- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ModalWindow
public ModalWindow(String id)
Deprecated.Creates a new modal window component.- Parameters:
id- Id of component
-
ModalWindow
public ModalWindow(String id, org.apache.wicket.model.IModel<?> model)
Deprecated.Creates a new modal window component.- Parameters:
id- Id of componentmodel- Model
-
-
Method Detail
-
renderHead
public void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
Deprecated.- Specified by:
renderHeadin interfaceorg.apache.wicket.markup.html.IHeaderContributor- Overrides:
renderHeadin classorg.apache.wicket.Component
-
newCssResource
protected org.apache.wicket.request.resource.ResourceReference newCssResource()
Deprecated.Allows to override CSS contribution. Returning null means the CSS will be contributed via other sources, e.g. a global CSS resource.- Returns:
- The CSS resource reference or null if CSS is contributed via other means.
- See Also:
setCssClassName(String)
-
isShown
public boolean isShown()
Deprecated.Is this window currently showing.- Returns:
- the shown
-
setPageCreator
public ModalWindow setPageCreator(ModalWindow.PageCreator creator)
Deprecated.Sets theinstance. The instance is only used when no custom component has been added to the dialog.ModalWindow.PageCreator- Parameters:
creator-instanceModalWindow.PageCreator- Returns:
- this
-
setCloseButtonCallback
public ModalWindow setCloseButtonCallback(ModalWindow.CloseButtonCallback callback)
Deprecated.Sets theinstance.ModalWindow.CloseButtonCallback- Parameters:
callback- Callback instance- Returns:
- this
-
setWindowClosedCallback
public ModalWindow setWindowClosedCallback(ModalWindow.WindowClosedCallback callback)
Deprecated.Sets the@{linkinstance.ModalWindow.WindowClosedCallback- Parameters:
callback- Callback instance- Returns:
- this
-
show
public void show(org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)
Deprecated.Shows the modal window.- Parameters:
target- Request target associated with current ajax request.
-
closeCurrent
public static void closeCurrent(org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)
Deprecated.Hides the modal window. This can be called from within the modal window, however, the modal window must have configured WindowClosedCallback. Otherwise use theclose(IPartialPageRequestHandler)method.- Parameters:
target- Request target associated with current ajax request.
-
close
public void close(org.apache.wicket.core.request.handler.IPartialPageRequestHandler target)
Deprecated.Closes the modal window.- Parameters:
target- Request target associated with current ajax request.
-
getShowJavaScript
protected CharSequence getShowJavaScript()
Deprecated.Method that allows alternate script for showing the window.- Returns:
- the script that actually shows the window.
-
getCloseJavacript
protected String getCloseJavacript()
Deprecated.Method that allows alternate script for closing the window.- Returns:
- the script that actually closes the window.
-
getContentId
public String getContentId()
Deprecated.Returns the id of content component.ModalWindow window = new ModalWindow(parent, "window"); new MyPanel(window, window.getContentId());
- Returns:
- Id of content component.
-
setMinimalWidth
public ModalWindow setMinimalWidth(int minimalWidth)
Deprecated.Sets the minimal width of window. This value is only used if the window is resizable. The width is specified in pixels and it is the width of entire window (including frame).- Parameters:
minimalWidth- Minimal window width.- Returns:
- this
-
getMinimalWidth
public int getMinimalWidth()
Deprecated.Returns the minimal width of window (in pixels).- Returns:
- Minimal width of window
-
setMinimalHeight
public ModalWindow setMinimalHeight(int minimalHeight)
Deprecated.Sets the minimal height of window. This value is only used if window is resizable. The height is specified in pixels and it is the height of window content (without frame).- Parameters:
minimalHeight- Minimal height- Returns:
- this
-
getMinimalHeight
public int getMinimalHeight()
Deprecated.Returns the minimal height of window (in pixels).- Returns:
- Minimal height of window
-
setCssClassName
public ModalWindow setCssClassName(String cssClassName)
Deprecated.Sets the CSS class name for this window. This class affects the look of window frame. Possible values (if you don't make your style sheet) areandCSS_CLASS_BLUE.CSS_CLASS_GRAY- Parameters:
cssClassName-- Returns:
- this
- See Also:
newCssResource()
-
getCssClassName
public String getCssClassName()
Deprecated.Returns the CSS class name for this window.- Returns:
- CSS class name
-
setInitialWidth
public ModalWindow setInitialWidth(int initialWidth)
Deprecated.Sets the initial width of the window. The width refers to the width of entire window (including frame). If the window is resizable, the width unit is always "px". If the window is not resizable, the unit can be specified usingsetWidthUnit(String). If cookie name is set and window is resizable, the initial width may be ignored in favor of width stored in cookie.- Parameters:
initialWidth- Initial width of the window- Returns:
- this
-
getInitialWidth
public int getInitialWidth()
Deprecated.Returns the initial width of the window.- Returns:
- Initial height of the window
-
setInitialHeight
public ModalWindow setInitialHeight(int initialHeight)
Deprecated.Sets the initial height of the window. The height refers to the height of window content (without frame). If the window is resizable, the height unit is always "px". If the window is not resizable, the unit can be specified usingsetHeightUnit(String). If cookie name is set and window is resizable, the initial height may be ignored in favor of height stored in cookie.- Parameters:
initialHeight- Initial height of the window- Returns:
- this
-
getInitialHeight
public int getInitialHeight()
Deprecated.Returns the initial height of the window.- Returns:
- Initial height of the window
-
setUseInitialHeight
public ModalWindow setUseInitialHeight(boolean useInitialHeight)
Deprecated.Sets whether to use initial height or preserve the real content height. This can only be used if the content is a component (not a page) and the window is not resizable.- Parameters:
useInitialHeight- Whether to use initial height instead of preserving content height instead of using initial height- Returns:
- this
-
isUseInitialHeight
public boolean isUseInitialHeight()
Deprecated.Returns true if the initial height should be used (in favor of preserving real content height).- Returns:
- True if initial height should be used, false is real content height should be preserved (valid only if the window is not resizable and the content is a component (not a page)
-
setResizable
public ModalWindow setResizable(boolean resizable)
Deprecated.Sets whether the user will be able to resize the window.- Parameters:
resizable- Whether the window is resizable- Returns:
- this
-
isResizable
public boolean isResizable()
Deprecated.Returns whether the window is resizable.- Returns:
- True if the window is resizable, false otherwise
-
showUnloadConfirmation
public ModalWindow showUnloadConfirmation(boolean unloadConfirmation)
Deprecated.Sets a flag whether to ask the user before leaving the page.- Parameters:
unloadConfirmation- a flag whether to ask the user before leaving the page- Returns:
thisinstance, for chaining
-
showUnloadConfirmation
public boolean showUnloadConfirmation()
Deprecated.Returns whether the user should be asked before leaving the page.- Returns:
trueif the user should be asked if the last action causes leaving the page,falseotherwise
-
setWidthUnit
public ModalWindow setWidthUnit(String widthUnit)
Deprecated.Sets the CSS unit used for initial window width. This is only applicable when the window is not resizable.- Parameters:
widthUnit- CSS unit for initial window width.- Returns:
- this
-
getWidthUnit
public String getWidthUnit()
Deprecated.Returns the CSS unit for initial window width.- Returns:
- CSS unit for initial window width.
-
setHeightUnit
public ModalWindow setHeightUnit(String heightUnit)
Deprecated.Sets the CSS unit used for initial window height. This is only applicable when the window is not resizable.- Parameters:
heightUnit- CSS unit for initial window height.- Returns:
- this
-
getHeightUnit
public String getHeightUnit()
Deprecated.Retrns the CSS unit for initial window height.- Returns:
- CSS unit for initial window height.
-
setCookieName
public ModalWindow setCookieName(String cookieName)
Deprecated.Sets the name of the cookie that is used to remember window position (and size if the window is resizable).- Parameters:
cookieName- Name of the cookie- Returns:
- this
-
getCookieName
public String getCookieName()
Deprecated.Returns the name of cookie that is used to remember window position (and size if the window is resizable).- Returns:
- Name of the cookie
-
setTitle
public ModalWindow setTitle(String title)
Deprecated.Sets the title of window. If the window is a page, title can benull. In that case it will display the title document inside the window.- Parameters:
title- Title of the window- Returns:
- this
-
setTitle
public ModalWindow setTitle(org.apache.wicket.model.IModel<String> title)
Deprecated.Sets the title of window. If the window is a page, title can benull. In that case it will display the title document inside the window.- Parameters:
title- Title of the window- Returns:
- this
-
getTitle
public org.apache.wicket.model.IModel<String> getTitle()
Deprecated.Returns the title of the window.- Returns:
- Title of the window
-
setMaskType
public ModalWindow setMaskType(ModalWindow.MaskType mask)
Deprecated.Sets the mask type of the window.- Parameters:
mask- The mask type- Returns:
- this
-
getMaskType
public ModalWindow.MaskType getMaskType()
Deprecated.Returns the mask type of the window- Returns:
- The mask type
-
onBeforeRender
protected void onBeforeRender()
Deprecated.- Overrides:
onBeforeRenderin classorg.apache.wicket.Component- See Also:
Component.onBeforeRender()
-
makeContentVisible
protected boolean makeContentVisible()
Deprecated.You may subclass this method in case you don't want to show up the window on normal page refresh.- Returns:
- true, if the window shall be shown
-
onComponentTag
protected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
Deprecated.- Overrides:
onComponentTagin classorg.apache.wicket.Component- See Also:
Component.onComponentTag(org.apache.wicket.markup.ComponentTag)
-
getContent
protected final org.apache.wicket.Component getContent()
Deprecated.Returns a content component. In case user haven't specified any content component, it returns an empty WebMarkupContainer.- Returns:
- Content component
-
isCustomComponent
protected boolean isCustomComponent()
Deprecated.Returns true if user has added own component to the window.- Returns:
- True if user has added own component to the window, false otherwise.
-
remove
public ModalWindow remove(org.apache.wicket.Component component)
Deprecated.- Overrides:
removein classorg.apache.wicket.MarkupContainer- See Also:
MarkupContainer.remove(org.apache.wicket.Component)
-
setContent
public ModalWindow setContent(org.apache.wicket.Component component)
Deprecated.Sets the content of the modal window.- Parameters:
component-- Returns:
- this;
-
getWindowOpenJavaScript
protected final String getWindowOpenJavaScript()
Deprecated.Returns the javascript used to open the window. SubclasspostProcessSettings(JSONObject)to modify the JavaScript if needed. See WICKET-12- Returns:
- javascript that opens the window
-
postProcessSettings
protected void postProcessSettings(com.github.openjson.JSONObject settings)
Deprecated.Method that allows tweaking the settings- Parameters:
settings-
-
onDetach
protected void onDetach()
Deprecated.Detach the 'title' model- Overrides:
onDetachin classorg.apache.wicket.MarkupContainer- See Also:
Component.onDetach()
-
setAutoSize
public ModalWindow setAutoSize(boolean autoSize)
Deprecated.Sets whether window size will be automatically adjusted on opening to fit content's width and height. Doesn't work on IE 6.- Parameters:
autoSize- Whether window size will be automatically adjusted- Returns:
- this
-
isAutoSize
public boolean isAutoSize()
Deprecated.Returns whether window will be opened in autosize mode.- Returns:
- True if the window will be opened open in autosize mode, false otherwise
-
newCloseButtonBehavior
protected ModalWindow.CloseButtonBehavior newCloseButtonBehavior()
Deprecated.Gives the possibility to provide customIAjaxCallListener- Returns:
- the behavior that should be used for the window close button
-
-