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

Taglib documentation for tag mak:list#

Description#

Performs a query on the database. The body of the list, if present, is run once for every item in the resulting data (size 0..N), e.g. to display it. Queries are generated on the spot and can be nested.
.

Attributes#

Name Required Runtime expression Description Comments
from true false
MQL FROM section. If the query is nested, the keys from the parent's query are added to this FROM section in the resulting query
.
Mandatory.
.
variableFrom false false
supplementary, variable MQL FROM section.
.
Can contain #{ JSP EL expressions }
.
where false false
MQL WHERE section. If the query is nested, the WHERE section from the parent's query, is added to this in the resulting query
.
Can contain #{ JSP EL expressions }
.
orderBy false false
MQL ORDER BY section
.
Can contain #{ JSP EL expressions } label.$fieldname used to be supported, not anymore
.
groupBy false false
MQL GROUP BY section
.
Can contain #{ JSP EL expressions }
.
id false false
Tag's identifier
.
Can be used to distinguish otherwise identical tags on a page (to avoid confusion by Makumba's JSP analyser)
.
db false true
The makumba database to connect to. The format is Host_SQLEngineType_DatabaseName If not present, the default database is used. See database configuration and lookup.
.
Cannot contain attributes, for now. The default database is chosen if this argument is not set. Can only be set for top-level (root) query tags Can be a Rtexpr <%= ...%>
.
offset false false
the offset of the result to show (0 for starting from the first result)
.
$attribute allowed. If $attribute is not found, defaults to 0. Only allowed for the outermost mak:list
.
limit false false
the maximum numbers of results to show (-1 for all results)
.
$attribute allowed. Only allowed for the outermost mak:list. if $attribute is not found, defaults to the value of defaultLimit, if present, or -1 otherwise. LIMIT can limit the query time dramatically, but the children mak:lists are not yet limited.
.
defaultLimit false false
the default value for limit, if the $attribute in limit="$attribute" is not present.
.
$attribute allowed. Only allowed for the outermost mak:list.
.
authorize false false

"binding" (or "auto") requires that the user has access (canRead() ) to all returned data. If that is not the case, an UnauthorizedException is raised.

"filter" filters out the results for which canRead() is false.

.

Experimental. Not yet used in production environments.

Note that this applies to all objects involved in the query that have a canRead(), e.g. if label.relation.field is used, label.relation.canRead() will be honoured if it exists.

.
countVar (deprecated) false false
The java.lang.Integer variable that will contain the number of the current iteration.
.
A new Java variable is created, so no other variable by the same name can exist in the Java scope at that point in the JSP. Deprecated: Use mak:count() expression language function instead
.
maxCountVar (deprecated) false false
The java.lang.Integer variable that will contain the total number of iterations.
.
A new Java variable is created, so no other variable by the same name can exist in the Java scope at that point in the JSP. Deprecated: use mak:maxCount() expression language function instead
.
separator (deprecated) false true
Character string as separator between two list elements. It is not included before the first or after the last
.
Deprecated, use <c:if test="${mak:count<mak:maxCount()}"> instead.
.

See also#

mak:value, mak:object

Examples#

<mak:list from="copmany.Employee e" where="e.department.company=$company AND p.gender=\"male\"" orderBy="e.surname, e.name">
    <c:if test="${mak:count()==1}">
        <p> There are ${mak:maxCount()} male employees:
    </c:if>
    <mak:value expr="e.surname"/>, <mak:value expr="e.name"/> -
    <mak:list from="e.projects p">
        <mak:value expr="p.name"/>
    </mak:list>
</mak:list>

<c:if test="${mak:lastCount()==0}"> There are no male employees. </c:if>
.

Category Documentation


Add Comment
« This page was last updated on August 1 2010