blob: 866ff5df0c4759380e41dd0f30c3f04f7cccf480 [file] [log] [blame]
<md-content layout="column" layout-align="center stretch" class="content">
<ul class="breadcrumb">
<li><a href="#/documentation/2.0.2">2.0.2</a> <span class="divider">/</span></li>
<li><a href="#/documentation/2.0.2/language/overview">Language</a> <span class="divider">/</span></li>
<li><a href="#/documentation/2.0.2/language/widgets">Widgets</a></li>
<h2 id="Label">Label</h2>
<h3 id="description">Description</h3>
<p>The label widget can be used to display a read-only piece of text in your user interface. Its behavior is almost the same as the
<a href="#/documentation/2.0.2/language/widgets/text">text</a> widget. On top of the common properties of all widgets (identifier, labelExpression, helpExpression, isEnabledExpression, propertyValidationRules), it has the following properties:
<li>valueExpression: The value expression is used to compute the body of the label widget.</li>
<li>displayExpression: This expression will have access to the result of the valueExpression thanks to a variable named value and it should return a string. If this expression is blank, a call to java.lang.Object#toString() will be performed on the result of the valueExpression instead.</li>
<li>style: The style of the label widget.</li>
<li>conditionalStyle: All the conditional styles of the label widget.</li>
<li>actions: All the widget actions of the label. Widget actions will be represented in the user interface by buttons.</li>
<p>A widget action contains only the following properties:</p>
<li>labelExpression: This expression is used to compute the label of the button. It should return a string.</li>
<li>actionExpression: This expression is used to define the behavior of the button. It will be executed when the end user will click on the button. It should not return anything.</li>
<li>imageExpression: This expression is used to compute the image to display in the button. This expression must return a string with the following structure PROJECT_NAME/IMAGE_PATH.</li>
<h3 id="displayreadonlyestringeattribute">Display a read-only EString EAttribute</h3>
<p>In order to display in the user interface a label with the value of a read-only EAttribute with the eType EString, you can create a label widget with the following properties:</p>
<p>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.</p>