makumba hackers: this page is generated, don't edit it! Instead edit the text in the included pages.

Taglib documentation for tag mak:section#

Description#

A section that can be hidden, shown or reloaded using events. It enables partial page rendering via asynchronous post-back.

Sections that have a showOn attribute will not be displayed until the event associated to the attribute is fired.

Sections that have a reloadOn attribute will be reloaded via partial rendering (i.e. without reloading the whole page via a new HTTP request, but by reloading only the given section using an asynchronous request).

.

Note

Experimental. Not yet used in production environments.

Attributes#

Name Required Runtime expression Description Comments
name true false
The name of the section, must be unique for the page
.
Mandatory.
.
showOn false false
The name of the event that causes this section to be displayed
.

.
hideOn false false
The name of the event that causes this section to be hidden
.

.
reloadOn false false
The name of the event that causes this section to be reloaded via partial post-back
.

.
iterationExpr false false
A MQL expression used to identify the section uniquely inside of a mak:list
.

.

See also#

mak:list

Examples#

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

<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, it can be uniquely identified using the iterationExpr attribute, which should be a MQL expression that uniquely identifies one iteration of the list.

<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>
.

Category Documentation


Add Comment
« This page was last updated on April 4 2016