Class BaseField
java.lang.Object
com.axemble.vdp.ui.framework.foundation.Component
com.axemble.vdp.ui.framework.foundation.Widget
com.axemble.vdp.ui.framework.widgets.CtlInputWidget
com.axemble.vdoc.sdk.document.fields.base.BaseField
- All Implemented Interfaces:
- IWidget,- IWritable,- com.axemble.vdp.ui.core.document.fields.IFieldControl,- com.axemble.vdp.utils.parameters.ParamsHandler,- Serializable
- Direct Known Subclasses:
- BaseWorkflowField,- LocalizedTextField,- PeriodSelectionRangeDatePickerField,- SelectionRangeDatePickerField,- SelectionRangeTimePickerField,- UrlSelectorField
public abstract class BaseField
extends com.axemble.vdp.ui.framework.widgets.CtlInputWidget
implements com.axemble.vdp.ui.core.document.fields.IFieldControl
This base class provides direct access to the SDK API.
- Version:
- 1.0, 15/04/2008
- Author:
- vlygeros
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected com.axemble.vdp.ui.core.document.fields.common.FieldAggregateFields inherited from class com.axemble.vdp.ui.framework.widgets.CtlInputWidgetaccessKey, includeErrorInfo, mandatory, quickCreateLink, stringRecipient, tabIndex, throwDocumentChangedScript, throwEvents, throwEventsDefined, validationRulesFields inherited from class com.axemble.vdp.ui.framework.foundation.WidgetactionListeners, isHidden, param, parentBlock, sysname, userIdFields inherited from class com.axemble.vdp.ui.framework.foundation.ComponentchangeListeners, LOGGERFields inherited from interface com.axemble.vdp.utils.parameters.ParamsHandlerERROR_EXCEED_ELEM_SIZE, ERROR_EXCEED_TOTAL_SIZE, ERROR_NOT_COMPLETED, ERROR_READ_FAILED, EXCEED_ELEM_NUMBER, NO_ERROR
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected final booleanThis method checks if any error has been found.com.axemble.vdp.ui.framework.document.fields.IAbstractFieldcom.axemble.vdp.ui.core.document.fields.ICoreFieldgetField()com.axemble.vdp.ui.framework.components.listeners.ChangeListenerprotected final StringgetTemplateAsString(String relativePath) protected final com.axemble.vdp.ui.framework.template.TemplateWritergetTemplateWriter(String relativePath) This method loads a template writer object from a HTML template file.protected final ObjectgetValue()Allow to retrieve a value from the internal field objectfinal voidfinal voidinit(com.axemble.vdp.ui.framework.document.fields.IAbstractField field, Element element, boolean editable, boolean mandatory) voidThis method is called once when the document is loadedfinal IWritableIf an error has been found, this method writes the message in a standard wayprotected final voidAllow to set a value to the internal field objectabstract voidabstract voidMethods inherited from class com.axemble.vdp.ui.framework.widgets.CtlInputWidgetaddRefreshButton, addValidationRule, buildFieldElement, canThrowEventsInWebBrowser, clearValidationRules, findStringRecipient, focus, getAccessKey, getAssociatedLabel, getDescription, getDocumentChangedScript, getErrorInfo, getHelpMessageIcon, getParentId, getQuickCreateLink, getRefreshButton, getTabIndex, getValidationObject, getValidationRules, handleNoParams, handleParams, handleParams, hasValidationRules, inform, isDescription, isDocumentChangedScript, isEditable, isEmpty, isFocus, isForceParentId, isIncludeErrorInfo, isMandatory, isThrowDocumentChangedScript, isThrowEventsDefined, renderErrorInfo, renderInfoMessage, renderQuickCreate, setAccessKey, setAssociatedLabel, setDescription, setEditable, setErrorInfo, setIncludeErrorInfo, setMandatory, setQuickCreateContextParameter, setQuickCreateScreen, setTabIndex, setThrowDocumentChangedScript, setThrowEvents, setThrowEventsDefined, setValidationRules, validateMethods inherited from class com.axemble.vdp.ui.framework.foundation.WidgetaddActionListener, addActionListener, afterInit, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireOnClickMessage, buildFireOnClickMessage, buildFormName, findFileRecipient, findXmlRecipient, fireActionEvent, getCtrlTemplate, getCtrlTemplateWriter, getJavaScriptFocusScript, getJavascriptId, getParam, getParentBlock, getSysname, getUserDisplayName, getUserId, handleAction, hasActionListeners, isHidden, refresh, refreshWidgets, removeActionListener, removeActionListener, removeActionListeners, render, renderMobile, setHidden, setParam, setParentBlock, setSysname, setUserId, writeMethods inherited from class com.axemble.vdp.ui.framework.foundation.ComponentaddChangeListener, addChangeListener, createComponent, evaluateExpressions, fireChangeEvent, getDynamicDescription, getDynamicLabel, getLanguage, getNavigator, getRootNavigator, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, hasChangeListeners, removeChangeListener, removeChangeListener, removeChangeListeners, stateChangedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axemble.vdp.ui.core.document.fields.IFieldControladdValidationRule, clearValidationRules, getUserId, getValidationRules, hasValidationRules, inform, isEditable, isHidden, isMandatory, setEditable, setHidden, setMandatory, setUserId, validateMethods inherited from interface com.axemble.vdoc.sdk.interfaces.ui.IWidgetaddChangeListener, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, hasChangeListeners, removeChangeListener, removeChangeListeners
- 
Field Details- 
aggregateprotected com.axemble.vdp.ui.core.document.fields.common.FieldAggregate aggregate
 
- 
- 
Constructor Details- 
BaseFieldpublic BaseField()
 
- 
- 
Method Details- 
getAbstractFieldpublic com.axemble.vdp.ui.framework.document.fields.IAbstractField getAbstractField()- Specified by:
- getAbstractFieldin interface- com.axemble.vdp.ui.core.document.fields.IFieldControl
 
- 
getFieldpublic com.axemble.vdp.ui.core.document.fields.ICoreField getField()- Specified by:
- getFieldin interface- com.axemble.vdp.ui.core.document.fields.IFieldControl
 
- 
getFieldChangeListenerpublic com.axemble.vdp.ui.framework.components.listeners.ChangeListener getFieldChangeListener()- Specified by:
- getFieldChangeListenerin interface- com.axemble.vdp.ui.core.document.fields.IFieldControl
 
- 
initpublic final void init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field, Element element) - Specified by:
- initin interface- com.axemble.vdp.ui.core.document.fields.IFieldControl
 
- 
initpublic final void init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field, Element element, boolean editable, boolean mandatory) - Specified by:
- initin interface- com.axemble.vdp.ui.core.document.fields.IFieldControl
 
- 
initThis method is called once when the document is loaded- Overrides:
- initin class- com.axemble.vdp.ui.framework.widgets.CtlInputWidget
- Parameters:
- element- The W3C Element object which defines the field
 
- 
updateControlpublic abstract void updateControl()- Specified by:
- updateControlin interface- com.axemble.vdp.ui.core.document.fields.IFieldControl
 
- 
updateValuepublic abstract void updateValue()- Specified by:
- updateValuein interface- com.axemble.vdp.ui.core.document.fields.IFieldControl
 
- 
getTemplateWriterprotected final com.axemble.vdp.ui.framework.template.TemplateWriter getTemplateWriter(String relativePath) throws RenderException This method loads a template writer object from a HTML template file. The relative path implies all the custom controls are in ".../storage/custom/controls/" directory.- Parameters:
- relativePath-
- Returns:
- a TemplateWriter object
- Throws:
- RenderException- Here is an example on how to use this method: TemplateWriter tw = null; if ( this.isEditable() ) { tw = this.getTemplateWriter( "CtlTextBox.edit.html" ); tw.setEntry( "id", new TemplateToken( this.getNavigator().registerWidget( this ) ) ); tw.setEntry( "label", new TemplateToken( HTMLUtils.getHTMLAttrString( this.label ) ) ); if ( checkErrorMessage() ) tw.setEntry( "error-message", this.renderErrorMessage() ); } else { tw = this.getTemplateWriter( "CtlTextBox.read.html" ); tw.setEntry( "label", new TemplateToken( HTMLUtils.getHTMLString( this.label ) ) ); }
 
- 
getTemplateAsString- Throws:
- RenderException
 
- 
checkErrorMessageprotected final boolean checkErrorMessage()This method checks if any error has been found.- Returns:
- true if an error was added, false otherwise.
 
- 
setValueAllow to set a value to the internal field object- Parameters:
- value- The value to set
 
- 
getValueAllow to retrieve a value from the internal field object- Returns:
- The value object
 
- 
renderErrorMessageIf an error has been found, this method writes the message in a standard way- Returns:
- IWritable object
- Throws:
- RenderException- Example: $error-message$ tag has to be in the HTML template, otherwise nothing will be shown. if ( checkErrorMessage() ) tw.setEntry( "error-message", this.renderErrorMessage() );
 
 
-