public abstract class BaseField
extends com.axemble.vdp.ui.framework.widgets.CtlInputWidget
implements com.axemble.vdp.ui.core.document.fields.IFieldControl
IWorkflowModule,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected com.axemble.vdp.ui.core.document.fields.common.FieldAggregate |
aggregate |
accessKey, includeErrorInfo, mandatory, quickCreateLink, stringRecipient, tabIndex, throwDocumentChangedScript, throwEvents, throwEventsDefined, validationRulesactionListeners, isHidden, param, parentBlock, sysname, userId| Constructor and Description |
|---|
BaseField() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkErrorMessage()
This method checks if any error has been found.
|
com.axemble.vdp.ui.framework.document.fields.IAbstractField |
getAbstractField() |
com.axemble.vdp.ui.core.document.fields.ICoreField |
getField() |
com.axemble.vdp.ui.framework.components.listeners.ChangeListener |
getFieldChangeListener() |
protected String |
getTemplateAsString(String relativePath) |
protected com.axemble.vdp.ui.framework.template.TemplateWriter |
getTemplateWriter(String relativePath)
This method loads a template writer object from a HTML template file.
|
protected Object |
getValue()
Allow to retrieve a value from the internal field object
|
void |
init(Element element)
This method is called once when the document is loaded
|
void |
init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field,
Element element) |
void |
init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field,
Element element,
boolean editable,
boolean mandatory) |
IWritable |
renderErrorMessage()
If an error has been found, this method writes the message in a standard way
|
protected void |
setValue(Object value)
Allow to set a value to the internal field object
|
abstract void |
updateControl() |
abstract void |
updateValue() |
addRefreshButton, 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, validateaddActionListener, 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, removeActionListeners, render, renderMobile, setHidden, setParam, setParentBlock, setSysname, setUserId, writeaddChangeListener, createComponent, evaluateExpressions, fireChangeEvent, getDynamicDescription, getDynamicLabel, getLanguage, getNavigator, getRootNavigator, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, hasChangeListeners, removeChangeListener, removeChangeListeners, stateChangedprotected com.axemble.vdp.ui.core.document.fields.common.FieldAggregate aggregate
public com.axemble.vdp.ui.framework.document.fields.IAbstractField getAbstractField()
getAbstractField in interface com.axemble.vdp.ui.core.document.fields.IFieldControlpublic com.axemble.vdp.ui.core.document.fields.ICoreField getField()
getField in interface com.axemble.vdp.ui.core.document.fields.IFieldControlpublic com.axemble.vdp.ui.framework.components.listeners.ChangeListener getFieldChangeListener()
getFieldChangeListener in interface com.axemble.vdp.ui.core.document.fields.IFieldControlpublic final void init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field,
Element element)
init in interface com.axemble.vdp.ui.core.document.fields.IFieldControlpublic final void init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field,
Element element,
boolean editable,
boolean mandatory)
init in interface com.axemble.vdp.ui.core.document.fields.IFieldControlpublic void init(Element element)
init in class com.axemble.vdp.ui.framework.widgets.CtlInputWidgetelement - The W3C Element object which defines the fieldpublic abstract void updateControl()
updateControl in interface com.axemble.vdp.ui.core.document.fields.IFieldControlpublic abstract void updateValue()
updateValue in interface com.axemble.vdp.ui.core.document.fields.IFieldControlprotected final com.axemble.vdp.ui.framework.template.TemplateWriter getTemplateWriter(String relativePath) throws RenderException
relativePath - 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 ) ) );
}protected final String getTemplateAsString(String relativePath) throws RenderException
RenderExceptionprotected final boolean checkErrorMessage()
protected final void setValue(Object value)
value - The value to setprotected final Object getValue()
public final IWritable renderErrorMessage() throws RenderException
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() );Copyright © 2022 Visiativ. All rights reserved.