blob: 3a2cacd06babc763306b31ee3252f0f26bfdb959 [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="Checkbox">Checkbox</h2>
<h3 id="description">Description</h3>
<p>The checkbox can be used to easily display and edit a boolean property. The properties available on this widget are very similar to the ones available on a
<a href="#/documentation/2.0.2/language/widgets/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 value to set in the checkbox widget. This expression must return a boolean.</li>
<li>editExpression: The edit expression will be executed when the user will click in the checkbox widget. The current value of the checkbox will be accessible in a variable named
<code>newValue</code>. The variable
<code>newValue</code> is a
<code>java.lang.Boolean</code>. This expression does not have to return anything.
<li>style: The style of the checkbox widget.</li>
<li>conditionalStyles: All the conditional styles of the checkbox widget.</li>
<h3 id="displayebooleaneattribute">Display an EBoolean EAttribute</h3>
<p>In order to display in the user interface a checkbox with the value of an EAttribute with the eType EBoolean (i.e. the property abstract of an EObject), you can create a checkbox widget with the following properties:</p>
<code>aql:self.eSet('abstract', newValue)</code>
<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. The operation
<code>eSet(java.lang.String, java.lang.Object)</code> used in the example does not exist in AQL. You would have to create it yourself.