blob: af6d2ebc21fb30e45f7c2fe1072120016a8c1a93 [file] [log] [blame]
<md-content layout="column" layout-align="center stretch" class="content">
<ul class="breadcrumb">
<li><a href="#/documentation/1.9.0">1.9.0</a> <span class="divider">/</span></li>
<li><a href="#/documentation/1.9.0/language/overview">Language</a> <span class="divider">/</span></li>
<li><a href="#/documentation/1.9.0/language/widgets">Widgets</a></li>
</ul>
<h2 id="List">List</h2>
<h3 id="description">Description</h3>
<p>The list in EEF lets you display and edit a list of elements easily. On top of the common properties of all widgets (identifier, labelExpression, helpExpression, isEnabledExpression, propertyValidationRules), it has the following properties:</p>
<ul>
<li>valueExpression: This expression will be used to compute all the valued will be displayed in the table. This expression must return an object.</li>
<li>displayExpression: This expression is used to compute each label of the table. This expression can use the result of the valueExpression thanks to the variable
<code>value</code>. This expression must return a string.
</li>
<li>onClickExpression: This expression will be executed when the user will click on the value. The user will be able to double click on a value. To determine whether the click on a single click or a double click, the kind of the click realized is available as a String in the variable
<code>onClickEventKind</code> which can have the value
<code>SINGLE_CLICK</code> or
<code>DOUBLE_CLICK</code>. This expression does not have to return anything.
</li>
<li>actions: The actions are a list of buttons which will be available next to the widget to allow the user to trigger some actions for the list. An action has a labelExpression which must return a string used as the label of the button created for the action. An action also has an action expression used to execute some behavior when the end user will click on the button. The action expression does not have to return anything. The action expression will have access to the selected elements in a variable named
<code>selection</code>.
</li>
<li>style: The style of the list widget.</li>
<li>conditionalStyles: All the conditional styles of the list widget.</li>
</ul>
<h3 id="displayereference">Display an EReference</h3>
<p>In order to display in the user interface a list widget with the value of a multi-valued EReference, you can create a list widget with the following properties:</p>
<ul>
<li>labelExpression:
<code>aql:'Children'</code>
</li>
<li>valueExpression:
<code>aql:self.children</code>
</li>
<li>displayExpression:
<code>aql:value.name</code>
</li>
</ul>
</md-content>