Sections can be shown, reloaded or displayed using the %%code mak.event(eventName, iterationExpression)%% javascript function.

[{Code

<mak:section name="employees" reloadOn="reloadbuttonPressed" hideOn="hideButtonPressed" showOn="showButtonPressed">
  <mak:list from="company.Employee e">
    <mak:value expr="e.name"/> <mak:value expr="e.surname"/><br />
  </mak:list>
</mak:section>
<br />
<button onClick="mak.event('showButtonPressed')">Show list of employees</button>
<button onClick="mak.event('reloadbuttonPressed')">Reload list of employees</button>
<button onClick="mak.event('hideButtonPressed')">Hide list of employees</button>
}]

When a section is inside of a [mak:list|ListTag], it can be uniquely identified using the %%code iterationExpr%% attribute, which should be a MQL expression that uniquely identifies one iteration of the list.

[{Code

<mak:list from="company.Employee e">
  <mak:section name="nameSurname" reloadOn="employeeRenamed" iterationExpr="e">
    <mak:value expr="e.name"/> <mak:value expr="e.surname"/><br />
  </mak:section>
    <button onClick="mak.event('employeeRenamed', '<mak:value expr="e" />')">Refresh this employee</button>
</mak:list>
}]
