Class WConfirmationButton
- java.lang.Object
-
- com.github.bordertech.wcomponents.AbstractWComponent
-
- com.github.bordertech.wcomponents.WBeanComponent
-
- com.github.bordertech.wcomponents.WButton
-
- com.github.bordertech.wcomponents.WConfirmationButton
-
- All Implemented Interfaces:
AccessKeyable
,AjaxTarget
,AjaxTrigger
,BeanAware
,BeanBound
,BeanProviderBound
,Container
,DataBound
,DialogOpenTrigger
,Disableable
,SubordinateTarget
,WComponent
,WebComponent
,Serializable
public class WConfirmationButton extends WButton
This component is a specialised version of a
WButton
that provides additional client-side functionality commonly associated with a "cancel" button.When a user presses the button, it displays a confirmation prompt before posting the form to the server.
WConfirmationButton button = new WConfirmationButton("Delete everything"); button.setMessage("Are you really sure you want to delete everything?"); // Set an action to run when the button is clicked. button.setAction(new Action() { public void execute(ActionEvent event) { // (Code to delete everything goes here) } });
- Since:
- 1.0.0
- Author:
- Martin Shevchenko
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.bordertech.wcomponents.WButton
WButton.ButtonModel, WButton.ImagePosition
-
Nested classes/interfaces inherited from class com.github.bordertech.wcomponents.AbstractWComponent
AbstractWComponent.WComponentRef
-
-
Field Summary
-
Fields inherited from interface com.github.bordertech.wcomponents.WComponent
DEFAULT_APPLICATION_ID, DEFAULT_INTERNAL_ID, DEFAULT_NO_ID, ID_CONTEXT_SEPERATOR, ID_FRAMEWORK_ASSIGNED_SEPERATOR, ID_VALIDATION_PATTERN
-
-
Constructor Summary
Constructors Constructor Description WConfirmationButton()
Creates an empty confirmation button.WConfirmationButton(String text)
Constructor.WConfirmationButton(String text, char accessKey)
Constructor.
-
Method Summary
-
Methods inherited from class com.github.bordertech.wcomponents.WButton
afterActionExecute, beforeActionExecute, clearPressed, focusMe, getAccessKey, getAction, getActionCommand, getActionObject, getAjaxTarget, getChildAt, getChildCount, getChildren, getComponentModel, getImage, getImageHolder, getImagePosition, getImageUrl, getIndexOfChild, getMessage, getOrCreateComponentModel, getText, getValue, handleRequest, isAjax, isCancel, isClientCommandOnly, isDisabled, isPopupTrigger, isPressed, isRenderAsLink, isUnsavedChanges, newComponentModel, preparePaintComponent, setAccessKey, setAction, setActionCommand, setActionObject, setAjaxTarget, setCancel, setClientCommandOnly, setDisabled, setImage, setImage, setImagePosition, setImageUrl, setMessage, setPopupTrigger, setPressed, setRenderAsLink, setText, setUnsavedChanges, setValue, toString
-
Methods inherited from class com.github.bordertech.wcomponents.WBeanComponent
addBeanToScratchMap, doUpdateBeanValue, getBean, getBeanFromScratchMap, getBeanId, getBeanProperty, getBeanProvider, getBeanScratchMap, getBeanValue, getData, isBeanInScratchMap, isChanged, isSearchAncestors, isUseRequestScopeScratchMap, removeBeanFromScratchMap, resetData, setBean, setBeanId, setBeanProperty, setBeanProvider, setData, setSearchAncestors, updateBeanValue
-
Methods inherited from class com.github.bordertech.wcomponents.AbstractWComponent
addHtmlClass, addHtmlClass, addNotify, afterPaint, assertAddSupported, beforePaint, createErrorDiagnostic, createErrorDiagnostic, forward, getAccessibleText, getAttribute, getBaseUrl, getDefaultModel, getEnvironment, getHeaders, getHtmlClass, getHtmlClasses, getId, getIdName, getInternalId, getLabel, getName, getParent, getScratchMap, getTabIndex, getTag, getTemplate, getTemplateMarkUp, getToolTip, hasNoComponentModel, hasTabIndex, initialiseComponentModel, invokeLater, invokeLaters, isDebugStructure, isDefaultState, isFlagSet, isHidden, isInitialised, isLocked, isTracking, isTrackingEnabled, isValidate, isVisible, paint, paintComponent, preparePaint, removeAttribute, removeComponentModel, removeHtmlClass, removeHtmlClass, removeNotify, replaceWComponent, reset, serviceRequest, setAccessibleText, setAttribute, setEnvironment, setFlag, setFocussed, setHidden, setHtmlClass, setHtmlClass, setIdName, setInitialised, setLocked, setTag, setToolTip, setTrackingEnabled, setValidate, setVisible, showErrorIndicators, showErrorIndicatorsForComponent, showWarningIndicators, showWarningIndicatorsForComponent, tidyUpUIContext, tidyUpUIContextForTree, validate, validateComponent, writeReplace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.bordertech.wcomponents.AccessKeyable
getAccessKeyAsString
-
Methods inherited from interface com.github.bordertech.wcomponents.WComponent
addHtmlClass, addHtmlClass, forward, getAccessibleText, getAttribute, getBaseUrl, getEnvironment, getHeaders, getHtmlClass, getHtmlClasses, getId, getIdName, getInternalId, getLabel, getName, getParent, getTabIndex, getTag, getToolTip, hasTabIndex, invokeLater, isDefaultState, isHidden, isInitialised, isLocked, isTracking, isTrackingEnabled, isValidate, isVisible, paint, preparePaint, removeAttribute, removeHtmlClass, removeHtmlClass, reset, serviceRequest, setAccessibleText, setAttribute, setEnvironment, setFocussed, setHtmlClass, setHtmlClass, setIdName, setInitialised, setLocked, setTag, setToolTip, setTrackingEnabled, setValidate, setVisible, showErrorIndicators, showWarningIndicators, tidyUpUIContextForTree, validate
-
-
-
-
Constructor Detail
-
WConfirmationButton
public WConfirmationButton()
Creates an empty confirmation button. An image or text must be provided separately.
-
WConfirmationButton
public WConfirmationButton(String text)
Constructor. Sets the button text.- Parameters:
text
- the button text
-
WConfirmationButton
public WConfirmationButton(String text, char accessKey)
Constructor. Set the button text and the accesskey. The accesskey in combination with the alt key will activate the button.- Parameters:
text
- the button text, usingMessageFormat
syntax.accessKey
- The access key.
-
-