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, 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 Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.axemble.vdp.ui.core.document.fields.common.FieldAggregate
     

    Fields inherited from class com.axemble.vdp.ui.framework.widgets.CtlInputWidget

    accessKey, includeErrorInfo, mandatory, quickCreateLink, stringRecipient, tabIndex, throwDocumentChangedScript, throwEvents, throwEventsDefined, validationRules

    Fields inherited from class com.axemble.vdp.ui.framework.foundation.Widget

    actionListeners, isHidden, param, parentBlock, sysname, userId

    Fields inherited from class com.axemble.vdp.ui.framework.foundation.Component

    changeListeners, LOGGER

    Fields inherited from interface com.axemble.vdp.utils.parameters.ParamsHandler

    ERROR_EXCEED_ELEM_SIZE, ERROR_EXCEED_TOTAL_SIZE, ERROR_NOT_COMPLETED, ERROR_READ_FAILED, EXCEED_ELEM_NUMBER, NO_ERROR
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final boolean
    This method checks if any error has been found.
    com.axemble.vdp.ui.framework.document.fields.IAbstractField
     
    com.axemble.vdp.ui.core.document.fields.ICoreField
     
    com.axemble.vdp.ui.framework.components.listeners.ChangeListener
     
    protected final String
     
    protected final com.axemble.vdp.ui.framework.template.TemplateWriter
    getTemplateWriter(String relativePath)
    This method loads a template writer object from a HTML template file.
    protected final Object
    Allow to retrieve a value from the internal field object
    final void
    init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field, Element element)
     
    final void
    init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field, Element element, boolean editable, boolean mandatory)
     
    void
    init(Element element)
    This method is called once when the document is loaded
    final IWritable
    If an error has been found, this method writes the message in a standard way
    protected final void
    Allow to set a value to the internal field object
    abstract void
     
    abstract void
     

    Methods inherited from class com.axemble.vdp.ui.framework.widgets.CtlInputWidget

    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, validate

    Methods inherited from class com.axemble.vdp.ui.framework.foundation.Widget

    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, removeActionListeners, render, renderMobile, setHidden, setParam, setParentBlock, setSysname, setUserId, write

    Methods inherited from class com.axemble.vdp.ui.framework.foundation.Component

    addChangeListener, createComponent, evaluateExpressions, fireChangeEvent, getDynamicDescription, getDynamicLabel, getLanguage, getNavigator, getRootNavigator, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, hasChangeListeners, removeChangeListener, removeChangeListeners, stateChanged

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.axemble.vdp.ui.core.document.fields.IFieldControl

    addValidationRule, clearValidationRules, getUserId, getValidationRules, hasValidationRules, inform, isEditable, isHidden, isMandatory, setEditable, setHidden, setMandatory, setUserId, validate
  • Field Details

    • aggregate

      protected com.axemble.vdp.ui.core.document.fields.common.FieldAggregate aggregate
  • Constructor Details

    • BaseField

      public BaseField()
  • Method Details

    • getAbstractField

      public com.axemble.vdp.ui.framework.document.fields.IAbstractField getAbstractField()
      Specified by:
      getAbstractField in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • getField

      public com.axemble.vdp.ui.core.document.fields.ICoreField getField()
      Specified by:
      getField in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • getFieldChangeListener

      public com.axemble.vdp.ui.framework.components.listeners.ChangeListener getFieldChangeListener()
      Specified by:
      getFieldChangeListener in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • init

      public final void init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field, Element element)
      Specified by:
      init in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • init

      public final void init(com.axemble.vdp.ui.framework.document.fields.IAbstractField field, Element element, boolean editable, boolean mandatory)
      Specified by:
      init in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • init

      public void init(Element element)
      This method is called once when the document is loaded
      Overrides:
      init in class com.axemble.vdp.ui.framework.widgets.CtlInputWidget
      Parameters:
      element - The W3C Element object which defines the field
    • updateControl

      public abstract void updateControl()
      Specified by:
      updateControl in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • updateValue

      public abstract void updateValue()
      Specified by:
      updateValue in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • getTemplateWriter

      protected 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

      protected final String getTemplateAsString(String relativePath) throws RenderException
      Throws:
      RenderException
    • checkErrorMessage

      protected final boolean checkErrorMessage()
      This method checks if any error has been found.
      Returns:
      true if an error was added, false otherwise.
    • setValue

      protected final void setValue(Object value)
      Allow to set a value to the internal field object
      Parameters:
      value - The value to set
    • getValue

      protected final Object getValue()
      Allow to retrieve a value from the internal field object
      Returns:
      The value object
    • renderErrorMessage

      public final IWritable renderErrorMessage() throws RenderException
      If 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() );