public abstract class BootstrapModal
extends org.apache.wicket.markup.html.panel.Panel
Java Code:
public abstract class ConfirmModal extends BootstrapModal{ public ConfirmModal(String id) { super(id); AjaxLink<Void> confirmBtn = new AjaxLink<Void>("closeOk") { public void onClick(AjaxRequestTarget target) { hide(); target.add(ConfirmModal.this); } }; add(confirmBtn); } }
HTML ConfirmModal.html:
<wicket:extend> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Exit</h4> </div> <div class="modal-body"> Do you really want to exit? </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancel</button> <button type="button" class="btn btn-primary">Confirm</button> </div> </div> </wicket:extend>
Constructor and Description |
---|
BootstrapModal(String id)
Instantiates a new bootstrap modal, not visible.
|
Modifier and Type | Method and Description |
---|---|
org.apache.wicket.MarkupContainer |
add(org.apache.wicket.Component... components) |
org.apache.wicket.MarkupContainer |
addOrReplace(org.apache.wicket.Component... components) |
void |
hide()
Hide the modal.
|
void |
hide(org.apache.wicket.ajax.AjaxRequestTarget target)
Hide the modal.
|
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
void |
show()
Show the modal.
|
getRegionMarkup, newMarkupSourcingStrategy
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
addDequeuedComponent, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
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, 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, onBeforeRender, onComponentTag, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead
in interface org.apache.wicket.markup.html.IHeaderContributor
renderHead
in class org.apache.wicket.Component
public void show()
AjaxRequestTarget
public void hide()
hide(AjaxRequestTarget)
public void hide(org.apache.wicket.ajax.AjaxRequestTarget target)
target
- the AjaxRequestTargetpublic org.apache.wicket.MarkupContainer add(org.apache.wicket.Component... components)
add
in class org.apache.wicket.MarkupContainer
public org.apache.wicket.MarkupContainer addOrReplace(org.apache.wicket.Component... components)
addOrReplace
in class org.apache.wicket.MarkupContainer
Copyright © 2014–2019 Premium Minds. All rights reserved.