org.wicketstuff.modalx
Class ModalFormPanel

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.markup.html.WebMarkupContainer
              extended by org.apache.wicket.markup.html.panel.Panel
                  extended by org.wicketstuff.modalx.ModalContentPanel
                      extended by org.wicketstuff.modalx.ModalFormPanel
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IConverterLocator, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable
Direct Known Subclasses:
MessageBox, ValidatingModalFormPanel

public class ModalFormPanel
extends ModalContentPanel

Class Name : ModalFormPanel Diagram : Wicket Generic Modal Windows Project : Echobase framework Type : concrete Base class for all modal content panels that contain a form.

Author:
Chris Colman
See Also:
Serialized Form

Field Summary
protected  Form<?> form
           
static int MR_CANCEL
           
static int MR_OK
           
 
Fields inherited from class org.wicketstuff.modalx.ModalContentPanel
modalContentWindow, windowCloseListener
 
Fields inherited from class org.apache.wicket.markup.html.panel.Panel
PANEL
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER
 
Constructor Summary
ModalFormPanel(ModalContentWindow iModalContentWindow, IWindowCloseListener iWindowCloseListener)
          Constructs the object passing in a IWindowClosedListener (which can be null if parent is not interested in being notified when the child form is closed).
 
Method Summary
 void addControlComponents()
          Adds the button controls to the form.
 void addFormComponents()
          Overridden in derived classes to add the form components.
 Form<?> createForm()
          Creates a Form object.
 int getModalResult()
          Returns modalResult
 void onCancel(AjaxRequestTarget target)
          Closes the modal window.
 void setModalResult(int modalResult)
          Sets modalResult
 void show(AjaxRequestTarget target)
          Get the ModalContentWindow to show this ModalContentPanel.
 void updateModel()
          Called after form submission with successful validation to update the domain model with data from the form components.
 
Methods inherited from class org.wicketstuff.modalx.ModalContentPanel
closeModal, getInitialHeight, getInitialWidth, getTitle, getVariation, setInitialHeight, setInitialWidth, setTitle, setVariation
 
Methods inherited from class org.apache.wicket.markup.html.panel.Panel
newMarkupSourcingStrategy
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebPage, getWebRequest, getWebResponse, getWebSession
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, 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, visitChildren
 
Methods inherited from class org.apache.wicket.Component
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, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, 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, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, 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, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MR_OK

public static final int MR_OK
See Also:
Constant Field Values

MR_CANCEL

public static final int MR_CANCEL
See Also:
Constant Field Values

form

protected Form<?> form
Constructor Detail

ModalFormPanel

public ModalFormPanel(ModalContentWindow iModalContentWindow,
                      IWindowCloseListener iWindowCloseListener)
Constructs the object passing in a IWindowClosedListener (which can be null if parent is not interested in being notified when the child form is closed).

Method Detail

addControlComponents

public void addControlComponents()
Adds the button controls to the form. By default OK and Cancel buttons are added but this method can be overridden to add a different button set like YES, NO etc.,


setModalResult

public void setModalResult(int modalResult)
Sets modalResult


getModalResult

public int getModalResult()
Returns modalResult


updateModel

public void updateModel()
Called after form submission with successful validation to update the domain model with data from the form components.


show

public void show(AjaxRequestTarget target)
Get the ModalContentWindow to show this ModalContentPanel.

Overrides:
show in class ModalContentPanel

addFormComponents

public void addFormComponents()
Overridden in derived classes to add the form components. Calll form.add to add components, not just add.


onCancel

public void onCancel(AjaxRequestTarget target)
Closes the modal window.


createForm

public Form<?> createForm()
Creates a Form object. Can be overridden in derived classes to create a form object that extends Form.



Copyright © 2007–2014. All rights reserved.