org.wicketstuff.modalx
Class MessageBox

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
                          extended by org.wicketstuff.modalx.MessageBox
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IConverterLocator, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable

public class MessageBox
extends ModalFormPanel

Class Name : MessageBox Diagram : Wicket Generic Modal Windows Project : Echobase framework Type : concrete Implements a simple way to communicate messages to users via a modal message box. It is designed to be used by calling the static show methods, not via the constructor directly. This class represents the body 'panel' of the message box. This code donated from the pagebloom project to the open source Modal X project.

Author:
Chris Colman
See Also:
Serialized Form

Field Summary
protected  int buttonConfig
          The button set to use - currently ignored will always just show OK.
static int MB_OK
           
static int MB_OK_CANCEL
           
static int MB_YES_NO
           
static int MB_YES_NO_CANCEL
           
protected  String message
          NoDesc
static int MR_NO
           
static int MR_YES
           
 
Fields inherited from class org.wicketstuff.modalx.ModalFormPanel
form, MR_CANCEL, 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
MessageBox(ModalContentWindow iModalContentWindow, String iMessage, String iTitle, int iButtonConfig, IWindowCloseListener iWindowCloseListener)
          Constructs the object
 
Method Summary
 void addControlComponents()
          Adds the button controls to the form.
 void addFormComponents()
          Overridden in derived classes to add the form components.
static int getDefaultWidth()
          Returns defaultWidth
static void setDefaultWidth(int iDefaultWidth)
          Sets defaultWidth
static MessageBox show(AjaxRequestTarget target, String message)
          Describe here
static MessageBox show(AjaxRequestTarget target, String message, String title)
          Describe here
static MessageBox show(AjaxRequestTarget target, String message, String title, int width, int height)
          Describe here
static MessageBox show(AjaxRequestTarget target, String message, String title, int width, int height, boolean autoHeight, int buttonConfig, IWindowCloseListener iWindowCloseListener)
          Describe here
static MessageBox showFixedHeight(AjaxRequestTarget target, String message, String title, int width, int height)
          Describe here
 
Methods inherited from class org.wicketstuff.modalx.ModalFormPanel
createForm, getModalResult, onCancel, setModalResult, show, updateModel
 
Methods inherited from class org.wicketstuff.modalx.ModalContentPanel
closeModal, createModalVisit, getInitialHeight, getInitialWidth, getTitle, setInitialHeight, setInitialWidth, setTitle
 
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, 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, getVariation, 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

MB_OK

public static final int MB_OK
See Also:
Constant Field Values

MB_OK_CANCEL

public static final int MB_OK_CANCEL
See Also:
Constant Field Values

MB_YES_NO

public static final int MB_YES_NO
See Also:
Constant Field Values

MB_YES_NO_CANCEL

public static final int MB_YES_NO_CANCEL
See Also:
Constant Field Values

MR_YES

public static final int MR_YES
See Also:
Constant Field Values

MR_NO

public static final int MR_NO
See Also:
Constant Field Values

message

protected transient String message
NoDesc


buttonConfig

protected transient int buttonConfig
The button set to use - currently ignored will always just show OK.

Constructor Detail

MessageBox

public MessageBox(ModalContentWindow iModalContentWindow,
                  String iMessage,
                  String iTitle,
                  int iButtonConfig,
                  IWindowCloseListener iWindowCloseListener)
Constructs the object

Method Detail

setDefaultWidth

public static void setDefaultWidth(int iDefaultWidth)
Sets defaultWidth


getDefaultWidth

public static int getDefaultWidth()
Returns defaultWidth


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.,

Overrides:
addControlComponents in class ModalFormPanel

addFormComponents

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

Overrides:
addFormComponents in class ModalFormPanel

showFixedHeight

public static MessageBox showFixedHeight(AjaxRequestTarget target,
                                         String message,
                                         String title,
                                         int width,
                                         int height)
Describe here


show

public static MessageBox show(AjaxRequestTarget target,
                              String message)
Describe here


show

public static MessageBox show(AjaxRequestTarget target,
                              String message,
                              String title)
Describe here


show

public static MessageBox show(AjaxRequestTarget target,
                              String message,
                              String title,
                              int width,
                              int height)
Describe here


show

public static MessageBox show(AjaxRequestTarget target,
                              String message,
                              String title,
                              int width,
                              int height,
                              boolean autoHeight,
                              int buttonConfig,
                              IWindowCloseListener iWindowCloseListener)
Describe here



Copyright © 2007-2013. All Rights Reserved.