public class Dialog extends Window
| Modifier and Type | Field and Description |
|---|---|
static String |
RSN_SAVE
Close reason
IWindowClosed.closed(String): the save button was pressed and onSave() did not die. |
| Constructor and Description |
|---|
Dialog() |
Dialog(boolean modal,
boolean resizable,
int width,
int height,
String title) |
Dialog(boolean modal,
boolean resizable,
String title) |
Dialog(boolean resizable,
String title) |
Dialog(int width,
int height,
String title) |
Dialog(String title) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buttonCancel()
Default handler for the cancel button: this will send the "CLOSE pressed" event (
FloatingDiv.RSN_CLOSE). |
protected void |
buttonSave()
The default save() implementation will call onValidate(), onSave(), then it will
send a
RSN_SAVE close event. |
protected void |
createButtons()
Can be overridden to add extra buttons to the button bar where needed - this default
implementation adds the save and cancel buttons.
|
protected void |
createCancelButton() |
protected void |
createCancelButton(String text) |
protected void |
createCancelButton(String text,
String image) |
protected DefaultButton |
createSaveButton() |
protected DefaultButton |
createSaveButton(String caption,
String iconUrl) |
IButtonBar |
getButtonBar()
Get the control's button bar.
|
IExecute |
getOnSave() |
Dialog |
modal() |
Dialog |
modal(boolean yes) |
protected boolean |
onCloseException(Exception x)
If sending the SAVE message fails with exception it can be handled here.
|
protected boolean |
onSave()
Override to validate data before the close event is sent and the window is closed.
|
protected boolean |
onSaveBind()
First part of save button handling: this should be overridden to move the data
in the dialog's controls into their model.
|
protected boolean |
onValidate()
Second part of the save button handling: this should validate all input present
in the model and any non-model controls.
|
Dialog |
resizable() |
void |
setButtonsOnBottom(boolean onbottom)
Define the button bar to be on the bottom.
|
void |
setOnSave(IExecute onSave) |
Dialog |
size(int width,
int height) |
Dialog |
title(String set) |
createFrame, createTitleBar, getBottomContent, getTopContent, getWindowTitle, isClosable, setClosable, setDimensions, setIcon, setWindowTitle, widthbeforeCreateContent, callCloseHandler, close, close, closePressed, getBrowserWindowSize, getClientBounds, getOnClose, internalGetHider, internalSetHider, isAutoClose, isModal, isResizable, onClosed, onRemoveFromPage, setAutoClose, setOnClose, setOnSizeAndPositionChange, verticallyAlignToCenterafterCreateContent, componentHandleWebAction, fadeIn, fadeOut, getCustomUpdatesCallJS, getDragHandler, getDropBody, getDropHandler, getDropMode, getReturnPressed, setDragHandler, setDropBody, setDropHandler, setReturnPressed, slideDown, slideUp, tb, visitadd, add, add, addTable, addTableForLayout, addTableForLayout, appendTreeErrors, canContain, delegateTo, disableAllChildControlsDeep, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChildren, getDelegate, getErrorFence, getTextContents, hasError, internalAdd, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalCreateFrame, internalGetNodeCount, internalGetOldChildren, internalOnBeforeRender, internalShelve, internalUnshelve, iterator, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setErrorFence, setErrorFence, setText, setValue, undelegatedAdd, undelegatedGetChild$, acceptRequestParameter, addBinding, addCssClass, addGlobalMessage, addNotificationListener, alignToLeft, alignToLeft, alignToMiddle, alignToMiddle, alignTopToBottom, alignTopToBottom, alignToRight, alignToRight, alignToTop, alignToTop, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, appendJQuerySelector, appendJsCustomUpdatesContributor, appendShowOverflowTextAsTitleJs, appendStatement, bind, bind, bindErrors, build, calcTestID, changed, changedJavascriptState, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, clearValidationFailure, componentHandleWebDataRequest, createContent, createStatement, findComponentBundle, findParent, getActualID, getAllocationTracepoint, getBindingErrors, getBindingList, getCalculatedTestID, getClicked, getComponentBundle, getComponentDataURL, getComponentDataURL, getComponentInfo, getComponentJSONURL, getCreateJS, getCssClass, getErrorList, getErrorLocation, getFocusID, getMessage, getOnClickJS, getOnMouseDownJS, getOnSizeAndPositionChange, getPage, getParent, getParent, getParent, getParentOfTypes, getSharedContext, getSharedContextFactory, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTestRepeatId, getThemedResourceRURL, getTitle, getUserObject, handleDrop, hasCssClass, hasParent, internalGetOldParent, internalGetParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalOnValueChanged, internalRenderJavascriptDelta, internalRenderJavascriptState, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetLogAllocations, internalSetTag, isAttached, isBuilt, isFocusable, isFocusRequested, isRendersOwnClose, isStretchHeight, lc, notify, notifyParentOrOpenerPage, onAddedToPage, onBeforeFullRender, onBeforeRender, onForceRebuild, onHeaderContributors, onShelve, onUnshelve, refresh, remove, removeBinding, removeCssClass, renderJavascriptDelta, renderJavascriptState, renderJavascriptState, replaceWith, setBrowserWindowSize, setCalculcatedId, setCalculcatedId, setClicked, setClientBounds, setComponentBundle, setCssClass, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setOverrideTitle, setSpecialAttribute, setStretchHeight, setTestID, setTestRepeatID, setTitle, setUserObject, toStringgetBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String RSN_SAVE
IWindowClosed.closed(String): the save button was pressed and onSave() did not die.public Dialog()
public Dialog(boolean modal,
boolean resizable,
int width,
int height,
String title)
public Dialog(boolean modal,
boolean resizable,
String title)
public Dialog(boolean resizable,
String title)
public Dialog(String title)
public Dialog(int width,
int height,
String title)
public void setButtonsOnBottom(boolean onbottom)
onbottom - protected void createButtons()
throws Exception
Exceptionpublic IButtonBar getButtonBar()
protected void createCancelButton()
@Nonnull protected DefaultButton createSaveButton()
@Nonnull protected DefaultButton createSaveButton(String caption, String iconUrl)
protected void buttonCancel()
throws Exception
FloatingDiv.RSN_CLOSE).Exceptionprotected void buttonSave()
throws Exception
RSN_SAVE close event. If the close event itself fails with exception
the code will ask onCloseException() to see if we need to throw the exception or if
it gets handled and shown as an error message or something like that.Exceptionprotected boolean onSaveBind()
throws Exception
Exceptionprotected boolean onValidate()
throws Exception
Exceptionprotected boolean onCloseException(Exception x) throws Exception
x - Exceptionprotected boolean onSave()
throws Exception
ExceptionCopyright © 2017 etc.to. All rights reserved.