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<Component>
,IEventSink
,IEventSource
,IFeedbackContributor
,IConverterLocator
,IMetadataContext<Serializable,Component>
,IQueueRegion
,IHeaderContributor
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
public class ModalWindow extends Panel
Deprecated.useModalDialog
insteadModal 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.PageCreator
method.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)
. Passtrue
to
to 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_BLUE
for 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 class
ModalWindow.CloseButtonBehavior
Deprecated.static interface
ModalWindow.CloseButtonCallback
Deprecated.Callback for close button that contains a method that is invoked after the button has been clicked.static class
ModalWindow.MaskType
Deprecated.Mask is the element behind the window, that prevents user from interacting the rest of page.static interface
ModalWindow.PageCreator
Deprecated.Interface for lazy page creation.static interface
ModalWindow.WindowClosedCallback
Deprecated.Callback called after the window has been closed.
-
Field Summary
Fields Modifier and Type Field Description static String
CONTENT_ID
Deprecated.the default id of the content componentstatic String
CSS_CLASS_BLUE
Deprecated.CSS class for window with blue border.static String
CSS_CLASS_GRAY
Deprecated.CSS class for window with gray border.-
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
-
-
Constructor Summary
Constructors Constructor Description ModalWindow(String id)
Deprecated.Creates a new modal window component.ModalWindow(String id, 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 void
close(IPartialPageRequestHandler target)
Deprecated.Closes the modal window.static void
closeCurrent(IPartialPageRequestHandler target)
Deprecated.Hides the modal window.protected String
getCloseJavacript()
Deprecated.Method that allows alternate script for closing the window.protected Component
getContent()
Deprecated.Returns a content component.String
getContentId()
Deprecated.Returns the id of content component.String
getCookieName()
Deprecated.Returns the name of cookie that is used to remember window position (and size if the window is resizable).String
getCssClassName()
Deprecated.Returns the CSS class name for this window.String
getHeightUnit()
Deprecated.Retrns the CSS unit for initial window height.int
getInitialHeight()
Deprecated.Returns the initial height of the window.int
getInitialWidth()
Deprecated.Returns the initial width of the window.ModalWindow.MaskType
getMaskType()
Deprecated.Returns the mask type of the windowint
getMinimalHeight()
Deprecated.Returns the minimal height of window (in pixels).int
getMinimalWidth()
Deprecated.Returns the minimal width of window (in pixels).protected CharSequence
getShowJavaScript()
Deprecated.Method that allows alternate script for showing the window.IModel<String>
getTitle()
Deprecated.Returns the title of the window.String
getWidthUnit()
Deprecated.Returns the CSS unit for initial window width.protected String
getWindowOpenJavaScript()
Deprecated.Returns the javascript used to open the window.boolean
isAutoSize()
Deprecated.Returns whether window will be opened in autosize mode.protected boolean
isCustomComponent()
Deprecated.Returns true if user has added own component to the window.boolean
isResizable()
Deprecated.Returns whether the window is resizable.boolean
isShown()
Deprecated.Is this window currently showing.boolean
isUseInitialHeight()
Deprecated.Returns true if the initial height should be used (in favor of preserving real content height).protected boolean
makeContentVisible()
Deprecated.You may subclass this method in case you don't want to show up the window on normal page refresh.protected ModalWindow.CloseButtonBehavior
newCloseButtonBehavior()
Deprecated.Gives the possibility to provide customIAjaxCallListener
protected ResourceReference
newCssResource()
Deprecated.Allows to override CSS contribution.protected void
onBeforeRender()
Deprecated.Called on all visible components before any component is rendered.protected void
onComponentTag(ComponentTag tag)
Deprecated.Processes the component tag.protected void
onDetach()
Deprecated.Detach the 'title' modelprotected void
postProcessSettings(com.github.openjson.JSONObject settings)
Deprecated.Method that allows tweaking the settingsModalWindow
remove(Component component)
Deprecated.Removes a component from the children identified by thecomponent.getId()
void
renderHead(IHeaderResponse response)
Deprecated.Render to the web response whatever the component wants to contribute to the head section.ModalWindow
setAutoSize(boolean autoSize)
Deprecated.Sets whether window size will be automatically adjusted on opening to fit content's width and height.ModalWindow
setCloseButtonCallback(ModalWindow.CloseButtonCallback callback)
Deprecated.Sets the
instance.ModalWindow.CloseButtonCallback
ModalWindow
setContent(Component component)
Deprecated.Sets the content of the modal window.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).ModalWindow
setCssClassName(String cssClassName)
Deprecated.Sets the CSS class name for this window.ModalWindow
setHeightUnit(String heightUnit)
Deprecated.Sets the CSS unit used for initial window height.ModalWindow
setInitialHeight(int initialHeight)
Deprecated.Sets the initial height of the window.ModalWindow
setInitialWidth(int initialWidth)
Deprecated.Sets the initial width of the window.ModalWindow
setMaskType(ModalWindow.MaskType mask)
Deprecated.Sets the mask type of the window.ModalWindow
setMinimalHeight(int minimalHeight)
Deprecated.Sets the minimal height of window.ModalWindow
setMinimalWidth(int minimalWidth)
Deprecated.Sets the minimal width of window.ModalWindow
setPageCreator(ModalWindow.PageCreator creator)
Deprecated.Sets the
instance.ModalWindow.PageCreator
ModalWindow
setResizable(boolean resizable)
Deprecated.Sets whether the user will be able to resize the window.ModalWindow
setTitle(String title)
Deprecated.Sets the title of window.ModalWindow
setTitle(IModel<String> title)
Deprecated.Sets the title of window.ModalWindow
setUseInitialHeight(boolean useInitialHeight)
Deprecated.Sets whether to use initial height or preserve the real content height.ModalWindow
setWidthUnit(String widthUnit)
Deprecated.Sets the CSS unit used for initial window width.ModalWindow
setWindowClosedCallback(ModalWindow.WindowClosedCallback callback)
Deprecated.Sets the@{link
instance.ModalWindow.WindowClosedCallback
void
show(IPartialPageRequestHandler target)
Deprecated.Shows the modal window.boolean
showUnloadConfirmation()
Deprecated.Returns whether the user should be asked before leaving the page.ModalWindow
showUnloadConfirmation(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 org.apache.wicket.IQueueRegion
dequeue, newDequeueContext
-
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, IModel<?> model)
Deprecated.Creates a new modal window component.- Parameters:
id
- Id of componentmodel
- Model
-
-
Method Detail
-
renderHead
public void renderHead(IHeaderResponse response)
Deprecated.Description copied from class:Component
Render to the web response whatever the component wants to contribute to the head section.- Specified by:
renderHead
in interfaceIHeaderContributor
- Overrides:
renderHead
in classComponent
- Parameters:
response
- Response object
-
newCssResource
protected 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 the
instance. 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 the
instance.ModalWindow.CloseButtonCallback
- Parameters:
callback
- Callback instance- Returns:
- this
-
setWindowClosedCallback
public ModalWindow setWindowClosedCallback(ModalWindow.WindowClosedCallback callback)
Deprecated.Sets the@{link
instance.ModalWindow.WindowClosedCallback
- Parameters:
callback
- Callback instance- Returns:
- this
-
show
public void show(IPartialPageRequestHandler target)
Deprecated.Shows the modal window.- Parameters:
target
- Request target associated with current ajax request.
-
closeCurrent
public static void closeCurrent(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(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) are
andCSS_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:
this
instance, for chaining
-
showUnloadConfirmation
public boolean showUnloadConfirmation()
Deprecated.Returns whether the user should be asked before leaving the page.- Returns:
true
if the user should be asked if the last action causes leaving the page,false
otherwise
-
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(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 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.Description copied from class:Component
Called on all visible components before any component is rendered.NOTE: If you override this, you *must* call super.onBeforeRender() within your implementation. Because this method is responsible for cascading
Changes to the component tree can be made only before calling super.onBeforeRender().Component.onBeforeRender()
call to its children it is strongly recommended that super call is made at the end of the override.- Overrides:
onBeforeRender
in classComponent
- 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(ComponentTag tag)
Deprecated.Description copied from class:Component
Processes the component tag. Overrides of this method most likely should call the super implementation.- Overrides:
onComponentTag
in classComponent
- Parameters:
tag
- Tag to modify- See Also:
Component.onComponentTag(org.apache.wicket.markup.ComponentTag)
-
getContent
protected final 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(Component component)
Deprecated.Description copied from class:MarkupContainer
Removes a component from the children identified by thecomponent.getId()
- Overrides:
remove
in classMarkupContainer
- Parameters:
component
- Component to remove from this container- Returns:
this
for chaining- See Also:
MarkupContainer.remove(org.apache.wicket.Component)
-
setContent
public ModalWindow setContent(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:
onDetach
in classMarkupContainer
- 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
-
-