public abstract class AbstractDialog<T> extends org.apache.wicket.markup.html.form.Form<T> implements IDialogService.Dialog, org.apache.wicket.ajax.IAjaxIndicatorAware
IDialogService.Dialog
interface. Provides OK and Cancel buttons by
default, and has support for fullscreen mode which is enabled by overriding isFullscreenEnabled
.Modifier and Type | Class and Description |
---|---|
protected class |
AbstractDialog.ExceptionFeedbackPanel |
protected static class |
AbstractDialog.PersistentFeedbackMessagesModel |
Modifier and Type | Field and Description |
---|---|
protected boolean |
cancelled |
protected org.apache.wicket.markup.html.panel.FeedbackPanel |
feedback |
protected AbstractDialog.PersistentFeedbackMessagesModel |
fmm |
ENCTYPE_MULTIPART_FORM_DATA, METHOD_GET, METHOD_POST
Constructor and Description |
---|
AbstractDialog() |
AbstractDialog(org.apache.wicket.model.IModel<T> model) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addAjaxIndicator() |
protected void |
addButton(org.apache.wicket.markup.html.form.Button button)
Add a
Button to the button bar. |
protected void |
closeDialog() |
protected void |
delegateSubmit(org.apache.wicket.markup.html.form.IFormSubmitter submittingComponent) |
protected String |
getAdditionalFullscreenScript(boolean isFullscreen)
Add custom javascript to be executed after the dialog has gone fullscreen or returned to it's initial size.
|
String |
getAjaxIndicatorMarkupId()
Implement
IAjaxIndicatorAware , to let ajax components in the dialog trigger the ajax indicator when they
trigger an ajax request. |
org.apache.wicket.Component |
getComponent() |
protected org.apache.wicket.model.IModel<String> |
getExceptionTranslation(Throwable t,
Object... parameters) |
protected org.apache.wicket.feedback.FeedbackMessagesModel |
getFeedbackMessagesModel() |
protected String |
getFullscreenScript()
Construct javascript that looks up the latest dialog and executes the toggleFullscreen function.
|
org.apache.wicket.util.value.IValueMap |
getProperties()
Properties that determine how the dialog is rendered.
|
UserSession |
getSession() |
protected void |
handleSubmit()
Method that handles the submit to a form.
|
protected boolean |
isFullscreenEnabled()
If this method returns true a fullscreen button will be added to the dialog which toggle's the between fullscreen
and initial size.
|
protected org.apache.wicket.markup.html.panel.FeedbackPanel |
newFeedbackPanel(String id)
Create a feedback panel and display only messages from children components.
|
protected void |
onCancel()
Callback method invoked when the user clicks the 'Cancel' button.
|
void |
onClose()
Implement onClose callback, invoked when the dialog is closed.
|
protected void |
onDetach() |
protected void |
onError() |
protected void |
onOk()
Callback method invoked when the user clicks the 'OK' button.
|
protected void |
onRemove() |
protected void |
onSubmit() |
void |
process(org.apache.wicket.markup.html.form.IFormSubmitter submittingComponent) |
protected void |
removeButton(org.apache.wicket.markup.html.form.Button button)
Remove a button from the button bar.
|
void |
render(PluginRequestTarget target)
Part of the pre-rendering registration.
|
void |
setAjaxChannel(org.apache.wicket.ajax.AjaxChannel ajaxChannel) |
protected void |
setButtonCssClass(String buttonCssClass)
Set a specific class that is added to all the buttons in the dialog
|
protected void |
setCancelEnabled(boolean isset) |
protected void |
setCancelKeyType(wicket.contrib.input.events.key.KeyType keyType) |
protected void |
setCancelLabel(org.apache.wicket.model.IModel<String> label) |
protected void |
setCancelLabel(String label) |
protected void |
setCancelVisible(boolean isset) |
void |
setDialogService(IDialogService dialogService)
When the dialog is shown (
IDialogService.show(Dialog) ), the
dialog service is injected into the dialog. |
AjaxUpdatingWidget<?> |
setFocus(AjaxUpdatingWidget<?> widget) |
org.apache.wicket.Component |
setFocus(org.apache.wicket.Component c) |
protected void |
setFocusOnCancel() |
protected void |
setFocusOnOk() |
void |
setNonAjaxSubmit() |
protected void |
setOkEnabled(boolean isset) |
protected void |
setOkKeyType(wicket.contrib.input.events.key.KeyType keyType) |
protected void |
setOkLabel(org.apache.wicket.model.IModel<String> label) |
protected void |
setOkLabel(String label) |
protected void |
setOkVisible(boolean isset) |
add, appendDefaultButtonField, beforeUpdateFormComponentModels, callOnError, clearInput, encodeUrlInHiddenFields, error, findForm, findSubmittingButton, getActionUrl, getDefaultButton, getFileMaxSize, getFormValidators, getHiddenFieldId, getInputNamePrefix, getJsForInterfaceUrl, getMaxSize, getMethod, getModel, getModelObject, getRootForm, getRootFormRelativeId, getStatelessHint, getValidatorKeyPrefix, handleMultiPart, hasError, internalOnModelChanged, isMultiPart, isRootForm, isSubmitted, markFormComponentsInvalid, markFormComponentsValid, onBeforeRender, onComponentTag, onComponentTagBody, onFileUploadException, onFormSubmitted, onFormSubmitted, onMethodMismatch, onValidate, onValidateModelObjects, registerJavaScriptNamespaces, remove, renderHead, renderPlaceholderTag, setDefaultButton, setFileMaxSize, setMaxSize, setModel, setModelObject, setMultiPart, setVersioned, updateFormComponentModels, validate, validateComponents, validateFormValidator, validateFormValidators, visitFormComponents, visitFormComponentsPostOrder, wantSubmitOnNestedFormSubmit, wantSubmitOnParentFormSubmit, writeParamsAsHiddenFields
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, 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, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onConfigure, onEvent, onInitialize, onModelChanged, onModelChanging, onReAdd, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTitle
forEach, spliterator
protected AbstractDialog.PersistentFeedbackMessagesModel fmm
protected org.apache.wicket.markup.html.panel.FeedbackPanel feedback
protected boolean cancelled
public AbstractDialog()
public AbstractDialog(org.apache.wicket.model.IModel<T> model)
protected org.apache.wicket.model.IModel<String> getExceptionTranslation(Throwable t, Object... parameters)
protected boolean addAjaxIndicator()
protected String getFullscreenScript()
getAdditionalFullscreenScript
protected String getAdditionalFullscreenScript(boolean isFullscreen)
isFullscreen
- flag indicating the current fullscreen stateprotected boolean isFullscreenEnabled()
public UserSession getSession()
getSession
in class org.apache.wicket.Component
protected void onDetach()
onDetach
in class org.apache.wicket.markup.html.form.Form<T>
protected org.apache.wicket.markup.html.panel.FeedbackPanel newFeedbackPanel(String id)
protected final org.apache.wicket.feedback.FeedbackMessagesModel getFeedbackMessagesModel()
public String getAjaxIndicatorMarkupId()
IAjaxIndicatorAware
, to let ajax components in the dialog trigger the ajax indicator when they
trigger an ajax request.getAjaxIndicatorMarkupId
in interface org.apache.wicket.ajax.IAjaxIndicatorAware
protected final void closeDialog()
public void setNonAjaxSubmit()
public void setAjaxChannel(org.apache.wicket.ajax.AjaxChannel ajaxChannel)
protected void setOkEnabled(boolean isset)
protected void setOkVisible(boolean isset)
protected void setOkLabel(String label)
protected void setOkLabel(org.apache.wicket.model.IModel<String> label)
protected void setFocusOnOk()
protected void setCancelEnabled(boolean isset)
protected void setCancelVisible(boolean isset)
protected void setCancelLabel(String label)
protected void setCancelLabel(org.apache.wicket.model.IModel<String> label)
protected void setFocusOnCancel()
protected void setOkKeyType(wicket.contrib.input.events.key.KeyType keyType)
protected void setCancelKeyType(wicket.contrib.input.events.key.KeyType keyType)
public void setDialogService(IDialogService dialogService)
IDialogService.show(Dialog)
), the
dialog service is injected into the dialog.setDialogService
in interface IDialogService.Dialog
protected void addButton(org.apache.wicket.markup.html.form.Button button)
Button
to the button bar. The id of the button must equal "button".protected void removeButton(org.apache.wicket.markup.html.form.Button button)
protected void setButtonCssClass(String buttonCssClass)
protected void handleSubmit()
protected void delegateSubmit(org.apache.wicket.markup.html.form.IFormSubmitter submittingComponent)
delegateSubmit
in class org.apache.wicket.markup.html.form.Form<T>
protected final void onSubmit()
onSubmit
in class org.apache.wicket.markup.html.form.Form<T>
protected final void onError()
onError
in class org.apache.wicket.markup.html.form.Form<T>
protected void onOk()
protected void onCancel()
public org.apache.wicket.Component getComponent()
getComponent
in interface IDialogService.Dialog
protected void onRemove()
onRemove
in class org.apache.wicket.Component
public void render(PluginRequestTarget target)
Implementations must invoke IRenderService.render(PluginRequestTarget)
on render services that contribute to the wicket component hierarchy.
render
in interface IDialogService.Dialog
public void onClose()
onClose
in interface IDialogService.Dialog
public org.apache.wicket.util.value.IValueMap getProperties()
getProperties
in interface IDialogService.Dialog
public org.apache.wicket.Component setFocus(org.apache.wicket.Component c)
public AjaxUpdatingWidget<?> setFocus(AjaxUpdatingWidget<?> widget)
public void process(org.apache.wicket.markup.html.form.IFormSubmitter submittingComponent)
process
in class org.apache.wicket.markup.html.form.Form<T>
Copyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.