## Text

### Description

The text widget is one of the most simple widget in EEF, with this widget your can create a single line or multiline text field in your user interface. On top of the common properties of all widgets (identifier, labelExpression, helpExpression, isEnabledExpression, propertyValidationRules), it has the following properties:

- valueExpression: The value expression is used to compute the value to set in the text field. This expression must return a string.
- editExpression: The edit expression will be executed when the user will type some content in the text field. The current value of the text field will be accessible in a variable named `newValue`. The variable `newValue` is a `java.lang.String`. This expression does not have to return anything.
- lineCount: The number of line of the text field. Use `1` for a single line text field or `5` (for example) for a multiline text field.
- style: The style of the text widget.
- conditionalStyles: All the conditional styles of the text widget.

### Display an EString EAttribute

In order to display in the user interface a text widget with the value of an EAttribute with the eType EString (i.e. the name of an EObject), you can create a text widget with the following properties:

- labelExpression: `aql:'Name:'`
- valueExpression: `aql:self.name`
- editExpression: `aql.self.eSet('name', newValue)`

EEF does not provide a default interpreter but you can easily configure EEF to be used with the AQL interpreter. In the integration of EEF with the AQL interpreter, you can register additional services, written in Java, in which you can expose to AQL new operations. The operation `eSet(java.lang.String, java.lang.Object)` used in the example does not exist in AQL. You would have to create it yourself.