public class CoreFields extends WPanel
This ValidatableComponent just contains examples of validation of all the core WComponents.
NOTE: This example makes use of the WFieldLayout and WField components to provide
alot of the ground work to do with validation of this component. The BasicFields example from the
.../examples/validation/basic package shows a similar setup but without using the
WFieldLayout and WField components.
The "sourceField" passed to the WFieldLayout (and the showErrorIndicators() method) must be consistent with the type of validation being performed so that the error messages can be successfully linked back to the appropriate input fields. (Another option would be to pass validation to a Business Object instance).
WPanel.PanelMode, WPanel.PanelModel, WPanel.TypeAbstractWComponent.WComponentRefDEFAULT_APPLICATION_ID, DEFAULT_INTERNAL_ID, DEFAULT_NO_ID, ID_CONTEXT_SEPERATOR, ID_FRAMEWORK_ASSIGNED_SEPERATOR, ID_VALIDATION_PATTERN| Constructor and Description |
|---|
CoreFields()
Creates a CoreFields example.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleRequest(Request request) |
protected void |
preparePaintComponent(Request request)
Override preparePaintComponent to perform initialisation the first time through.
|
void |
setCancelAction(Action action)
Sets the cancel button's action.
|
void |
setResetAction(Action action)
Sets the reset button's action.
|
void |
setSubmitAction(Action action)
Sets the submit button's action.
|
add, add, getAccessKey, getComponentModel, getDefaultSubmitButton, getLayout, getLayoutConstraints, getMargin, getMode, getOrCreateComponentModel, getTitleText, getType, newComponentModel, remove, setAccessKey, setDefaultSubmitButton, setLayout, setMargin, setMode, setTitleText, setType, toStringadd, add, getChildAt, getChildCount, getChildren, getIndexOfChild, getNamingContextId, isNamingContext, removeAll, setNamingContext, setTemplate, setTemplate, setTemplateMarkUpaddBeanToScratchMap, doUpdateBeanValue, getBean, getBeanFromScratchMap, getBeanId, getBeanProperty, getBeanProvider, getBeanScratchMap, getBeanValue, getData, isBeanInScratchMap, isChanged, isSearchAncestors, isUseRequestScopeScratchMap, removeBeanFromScratchMap, resetData, setBean, setBeanId, setBeanProperty, setBeanProvider, setData, setSearchAncestors, updateBeanValueaddHtmlClass, 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, writeReplaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAccessKeyAsStringaddHtmlClass, 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, validateaddAllpublic void setCancelAction(Action action)
action - the cancel action.public void setSubmitAction(Action action)
action - the submit action.public void setResetAction(Action action)
action - the reset action.public void handleRequest(Request request)
handleRequest in interface WComponenthandleRequest in class AbstractWComponentprotected void preparePaintComponent(Request request)
preparePaintComponent in class AbstractWComponentrequest - the request being responded to.Copyright © 2024. All rights reserved.