<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//MAKUMBA//DTD Documentation V2.0//EN" "document-v20-mak.dtd"><document>
    <header>
        <title>mak:list tag documentation</title>
    </header>
    <body>
        <section id="description">
      
      
          <title>Description</title>      <p>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.</p>    </section>
        <section id="attributes">
            <title>Attributes</title>
            <table>
                <tr>
                    <th>Name</th>
                    <th>Required</th>
                    <th>Request-time</th>
                    <th>Description</th>
                    <th>Comments</th>
                </tr>
                <tr>
                    <td>from</td>
                    <td class="center required">true</td>
                    <td class="center">false</td>
                    <td>OQL FROM section. If the query is nested, the keys from the parent's query are added to this FROM
        section in the resulting query</td>
                    <td>Fixed, Mandatory.</td>
                </tr>
                <tr>
                    <td>variableFrom</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>supplementary, variable OQL FROM section.</td>
                    <td>Fixed, can contain #{ JSP EL expressions }</td>
                </tr>
                <tr>
                    <td>where</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>OQL WHERE section. If the query is nested, the WHERE section from the parent's query, is added to
        this in the resulting query</td>
                    <td>Fixed, can contain #{ JSP EL expressions }</td>
                </tr>
                <tr>
                    <td>orderBy</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>OQL ORDER BY section</td>
                    <td>Fixed, can contain #{ JSP EL expressions } label.$fieldname used to be supported, not anymore</td>
                </tr>
                <tr>
                    <td>groupBy</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>OQL GROUP BY section</td>
                    <td>Fixed, can contain #{ JSP EL expressions }</td>
                </tr>
                <tr>
                    <td>id</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>Tag's identifier</td>
                    <td>Fixed. Can be used to distinguish otherwise identical tags on a page (to avoid confusion by Makumba's
        JSP analyser)</td>
                </tr>
                <tr>
                    <td>db</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>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.</td>
                    <td>Fixed, 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 &lt;%= ...%&gt;</td>
                </tr>
                <tr>
                    <td>offset</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>the offset of the result to show (0 for starting from the first result)</td>
                    <td>Fixed ($attribute allowed). If $attribute is not found, defaults to 0. Only allowed for the outermost
        mak:list</td>
                </tr>
                <tr>
                    <td>limit</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>the maximum numbers of results to show (-1 for all results)</td>
                    <td>Fixed ($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.</td>
                </tr>
                <tr>
                    <td>defaultLimit</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>the default value for limit, if the $attribute in limit="$attribute" is not present.</td>
                    <td>Fixed ($attribute allowed). Only allowed for the outermost mak:list.</td>
                </tr>
                <tr>
                    <td>authorize</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td class="missingDoc">Document me please</td>
                    <td class="missingDoc">Document me please</td>
                </tr>
                <tr>
                    <td>editable</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td class="missingDoc">Document me please</td>
                    <td class="missingDoc">Document me please</td>
                </tr>
                <tr>
                    <td>logicClass</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td class="missingDoc">Document me please</td>
                    <td class="missingDoc">Document me please</td>
                </tr>
                <tr>
                    <td>editPage</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td class="missingDoc">Document me please</td>
                    <td class="missingDoc">Document me please</td>
                </tr>
                <tr class="deprecated">
                    <td class="deprecated">countVar (deprecated)</td>
                    <td class="deprecated center">false</td>
                    <td class="deprecated center">false</td>
                    <td class="deprecated">The java.lang.Integer variable that will contain the number of the current iteration.</td>
                    <td class="deprecated">Fixed. 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</td>
                </tr>
                <tr class="deprecated">
                    <td class="deprecated">maxCountVar (deprecated)</td>
                    <td class="deprecated center">false</td>
                    <td class="deprecated center">false</td>
                    <td class="deprecated">The java.lang.Integer variable that will contain the total number of iterations.</td>
                    <td class="deprecated">Fixed. 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</td>
                </tr>
                <tr class="deprecated">
                    <td class="deprecated">separator (deprecated)</td>
                    <td class="deprecated center">false</td>
                    <td class="deprecated center">true</td>
                    <td class="deprecated">Character string as separator between two list elements. It is not included before the first or after
        the last</td>
                    <td class="deprecated">Deprecated, use &lt;c:if test="${mak:count&lt;mak:maxCount()}"&gt; instead.</td>
                </tr>
            </table>
        </section>
        <section id="example">
      
          <title>Example</title>      <source>
      <![CDATA[
<mak:list from="best.Student s, s.person p" where="p.gender=\"male\"" orderBy="p.name">

    <c:if test="${mak:count()==1}">
        <p> There are ${mak:maxCount()} male students:
    </c:if>

    <br> <%= counter %>.
    <mak:value expr="p.name"/>
    <mak:value expr="p.surname"/> <br>
    <mak:list from="p.addresses a">
        <mak:value expr="a.streetno"/> <mak:value expr="a.city"/>
    </mak:list>
</mak:list>

<c:if test="${mak:lastCount()==0}"> There are no male students. </c:if>
      ]]>
  </source>    </section>
        <section id="seeAlso">
            <title>See also</title>
            <ul>
                <li>
                    <a href="/doc/taglib/makvalue.html">mak:value</a>
                </li>
                <li>
                    <a href="/doc/taglib/makobject.html">mak:object</a>
                </li>
            </ul>
        </section>
    </body>
</document>