eva/3 Application BuilderDeveloping eva/3 ApplicationsWorking with expressions 

Objects

Objects allows to access forms, reports and their components. Objects which are build on each other are separated by "!". Functions which are performed on an object, are always the last entry in the object list and are separated by a ".".

Notation: completly upper cased terms are constant names which name could not be changed. The case is irrelevant for execution. All other terms can should be replaces for the individual case.

Objects Syntax
[FORMS]
-
[FORMULARE]
Designated the access at an amount of available forms. The object can not be used alone and owns no personal value. Allows the access on a named form. [Forms]
[FORMS]![Form name]
Designated the access at a specified form. Instead of the identifiers form name is the name of the form to enter without the file extension ".form" . The invocation of the form returns those name. Allows the access at components and functions of the form. [Formulare]![Form name]

[Form name]: Allows the access at a named form. The condition is that the
object [Formulare] is the neighbour object.
[CURRENTFORM]
-
[CURRENTWINDOW]
Designated the access at the currently active form. The following object can be a component which is contained by the active form.

Example: =[CURRENTFORM]![txt_person] The result is the value of the component with the name txt_person in the active form.
[Currentform]
[Component name]
Designated the access at a component in the actual form or report. The access at another, opened form can happen by the object neighbours [Formulare]![Formularname] . The component name is differentiate between upper- and lowercase .

The invocation of the component returns the actual contained value. The contained value can be a numeric value, a string, a date, a boolean value, or a constant. If the component implements the interface ControlledBean, then the return value is Controlled Value (unformatted value).

The form component furthermore allows the access at functions of the component.

Example: =[txt_personen] The result is the value of the component with the name txt_personen in the active form.
[Component name]

[Component name]: Allows the access at a named form.
[Column name]
Describes the access at the table column for the main data source in reports or any STableElement in a form. If there is a component with the same name, the value for the component will be returned. The invocation of the column returns the value for the data record at the current row.

Example: =[persons] The result is the value of the column named persons.
[Column name]

[Column name]: Allows the access at a named column.
[Page], [Pages], [ReportName], [SystemTime]
This objects are only available with reports and allows to access the current page number, the number of pages and the report name. [Page]: Allows to access the current page number.

[Pages]: Allows to access the number of available pages.

[ReportName]: Allows to access the name of the report.

[SystemTime]: Allows to access the system time. The output is the same as the function now().
[ROW], [COLUMN] This objects are only available with TBeans within a SScrollTable.

Example: =[STableElement_customers].getObject([ROW]+1, 1) the result is the value of the first column and the current SScrollTable row of the STableElement with the name STableElement_customers.
[ROW]: Allows to access the current row number.

[COLUMN]: Allows to access the current column number.
[SYSVARIABLE]![Name]
The SYSVARIABLE object allows the access at the eva/3 system variables. This variables are normally used with java method EvaUtils.putVariable(key, value).

If the system variable is not set, null will be returned. The result value is the object which was previously stored.
Sinceeva/3 Application Builder 1.4.45, java system properties can be also accessed using the [SYSVARIABLE] object. Some exemplary java properties:
Property Description
java.version Java version number
java.vendor Producer
java.vendor.url URL to the producer
java.home Installation folder
java.class.version version number for the java class libraray
java.class.path Current classpath
os.name Name of the used operating system
os.arch operating system architecture
os.version operating system version number
file.separator File separation char
path.separator device separation char
line.separator Line feed char
user.name Name of the current user
user.home User home folder
user.dir Current working folder
[Sysvariable]: Defines the access at a system variable

[Name]: This is the name for the system variable to access.

Invoking methods

Methods can be invoked on different object types. The quoted function calls the object method with primitive data type arguments or strings. Method of own beans can also be invoked by object functions. Object functions are separated from the object by a point and always have a closing bracket couple for the parameter delivery. Object functions with the return value void always return a constant with the value null.

Examples:

Function Description Valid for
setControlledValue Sets the value of the specified component. All components that implement the interface ControlledBean own this method.

Example: =[txt_personen].setControlledValue("Wert")
SScrollTextArea, SComboBox, SCheckBox, SOptionGroup, SFormattedField, P2DBarCode, PBarCode, PCheckBox, PTextArea, PFormattedField
getControlledValue Returns the value of the specified component. All components that implement the interface ControlledBean own this method.

Beispiel: =[txt_personen].getControlledValue()
SScrollTextArea, SComboBox, SCheckBox, SOptionGroup, SFormattedField, P2DBarCode, PBarCode, PCheckBox, PTextArea, PFormattedField
setBackground Sets the background for a component using an RGB object. This function invkoes the java method also named setBackground. Also works with other methods requires a java.awt.Color object.

Beispiel: =[txt_personen].setBackground(RGB(255; 30; 30))
All components extends javax.swing.JComponent.

Accesing fields

Fields can also be accessed by writing the field name behind the related object. Fields which are declared as private, protected or packaged can also be accessed widtout any limitation.

Examples:

Field Description Valid for
editable Allows the direct acces to the field named editable on an SFormattedField and returns the boolean value true if the SFormattedField is editable and false otherwise.

Beispiel: =[txt_personen].editable()
SFormattedField, PFormattedField