Interface BaseForm

All Superinterfaces:
Element, EventOwner, java.io.Serializable
All Known Subinterfaces:
IntegrationService, RESTfulWebService, WebForm, WorkflowJob

public interface BaseForm
extends EventOwner
BaseForm is an interface that represents any Ebase runnable entity that can have fields, tables and access to resources via a Business View. This interface is extended by WebForm (an interactive form), IntegrationService (an Integration Service) and WorkflowJob (a workflow job). It also provides the basic interface for a component's view of its fields, tables, resources etc when the component is deployed.
Since:
V4.4
  • Method Summary

    Modifier and Type Method Description
    void abort​(java.lang.String message)
    Aborts execution of the current form, integration service or workflow node and rolls back the current transaction.
    java.lang.String getAbortMessage()
    Returns the abort message after a failure has occurred.
    Fields getFields()
    Returns the Fields object that gives access to all fields available to the form.
    java.lang.String getLanguage()
    Returns the language code for the user session.
    Resources getResources()
    Returns the Resources object that gives access to all resources available to the form.
    Tables getTables()
    Returns the Tables object that gives access to all tables available to the form.
    Texts getTexts()
    Returns the Texts object that gives access to all texts available to the form.
    java.lang.String getTimezone()
    Returns the time zone used for the form.
    void setLanguage​(java.lang.String language)
    Sets the language code for the user session.
    void setTimezone​(java.lang.String timezone)
    Sets the time zone for the current form, service or workflow process.

    Methods inherited from interface com.ebasetech.xi.api.Element

    getElementName, getElementType
  • Method Details

    • getLanguage

      java.lang.String getLanguage()
      Returns the language code for the user session. Language codes are defined in the Internationalization dialog. See Tools > System Preferences > Internationalization.

      The language is used to:

      • Display language sensitive items: texts, messages and static lists
      • Control the formatting of numeric and date fields when data is presented to the user or entered by the user
      • Set the character encoding (optional)
      Further documentation.
      Returns:
      language code
      Since:
      V4.4
    • setLanguage

      void setLanguage​(java.lang.String language)
      Sets the language code for the user session. Language codes must be defined in the Internationalization dialog. See Tools > System Preferences > Internationalization.

      The language is used to:

      • Display language sensitive items: texts, messages and static lists
      • Control the formatting of numeric and date fields when data is presented to the user or entered by the user
      • Set the character encoding (optional)
      Further documentation.

      Example:

       form.setLanguage("es_US");
       
      Parameters:
      language - language code
      Since:
      V4.4
    • abort

      void abort​(java.lang.String message)
      Aborts execution of the current form, integration service or workflow node and rolls back the current transaction. If an on error event is specified, this will receive control and can access the abort message via getAbortMessage(). Otherwise the default system abort page is displayed.
      Parameters:
      message - the failure message
      Since:
      V4.4
    • getAbortMessage

      java.lang.String getAbortMessage()
      Returns the abort message after a failure has occurred. This is intended to be used in an on error event.
      Returns:
      the failure message or null if no failure has occurred
      Since:
      V4.4
    • getResources

      Resources getResources()
      Returns the Resources object that gives access to all resources available to the form. An individual resource can then be accessed using its resource name as shown in the examples below.

      Javascript example:

       resources.EMAIL1.sendmail();
       form.getResources().WEB_SERVICE1.call();
       
      Returns:
      Resources
      Since:
      V4.4
    • getFields

      Fields getFields()
      Returns the Fields object that gives access to all fields available to the form. An individual field can then be accessed using its field name as shown in the examples below.

      Javascript example:

       var v1 = fields.FIELD1.value;
       var v2 = form.getFields().FIELD_2.value;
       
      Returns:
      Fields
      Since:
      V4.4
    • getTables

      Tables getTables()
      Returns the Tables object that gives access to all tables available to the form. An individual table can then be accessed using its table name as shown in the examples below.

      Javascript example:

       var t1 = tables.TABLE1;
       var t2 = form.getTables().TABLE2;
       
      Returns:
      Tables
      Since:
      V4.4
    • getTexts

      Texts getTexts()
      Returns the Texts object that gives access to all texts available to the form. An individual text can then be accessed using its text id as shown in the examples below.

      Javascript example:

       var v1 = texts.Txt23.text;
       var v2 = form.getTexts().Msg1.text;
       
      Returns:
      Texts
      Since:
      V5.0
    • getTimezone

      java.lang.String getTimezone()
      Returns the time zone used for the form. A time zone can be set at form level using setTimezone(String), can be set at Ebase system level using the Server Admin Application. If neither of these is configured, the time zone on the operating system is used.
      Returns:
      time zone
      Since:
      V5.2
      See Also:
      setTimezone(String)
    • setTimezone

      void setTimezone​(java.lang.String timezone)
      Sets the time zone for the current form, service or workflow process. All dates and times displayed on web pages will use this time zone. It is recommended that this method is called to set a time zone prior to setting values on any fields of type date, time or datetime.

      Examples:

       form.setTimezone("America/Chicago");
       form.setTimezone("America/Los_Angeles");
       form.setTimezone("America/New_York");
       form.setTimezone("Europe/Paris");
       form.setTimezone("Etc/GMT");
       
      Parameters:
      timezone - time zone
      Since:
      V5.2