<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//MAKUMBA//DTD Documentation V2.0//EN" "document-v20-mak.dtd"><document>
    <header>
        <title>mak:value tag documentation</title>
    </header>
    <body>
        <section id="description">
      
      
          <title>Description</title>      <p>Displays the value of an expression from within the query.
</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>expr</td>
                    <td class="center required">true</td>
                    <td class="center">false</td>
                    <td>OQL SELECT projection expression. It will be displayed if var nor printVar are not specified.
      </td>
                    <td>Fixed, Mandatory.</td>
                </tr>
                <tr>
                    <td>var</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>The value of the expression is set to a new java.lang.Object variable by this name, as well as to a
        page-scope attribute, also by the same name (accessible as $attributename).</td>
                    <td>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.
        Note: the Java variable must be cast to its specific type (Integer, String, Date, Text, Pointer, Vector) before using it
        as such.</td>
                </tr>
                <tr>
                    <td>printVar</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>The formatted output as it would have been printed, is instead stored in a new java.lang.String
        variable by this name, as well as to a page-scope attribute by the same name (accessible as $attributename).
      </td>
                    <td>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.</td>
                </tr>
                <tr>
                    <td>urlEncode</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Indicates if the expression will be part of an URL or not. If "true", the output is URL-encoded.
        Default is "false".</td>
                    <td>Rtexpr.</td>
                </tr>
                <tr>
                    <td>html</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Normal behaviour is to transform character output to its HTML escaped form. If this is "true",
        content is assumed to be HTML, and is not escaped. If "auto", heuristically checks the content for HTML tags and
        inhibits escape if there are any; note: only the first 32768 characters are checked (32kB). Default is "false".
      </td>
                    <td>Rtexpr. Only char[] and text</td>
                </tr>
                <tr>
                    <td>format</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Format string to specify the formatting of a date value, according to java.text.SimpleDateFormat
      </td>
                    <td>Rtexpr. Only for date. Defaults to "dd MMMM yyyy"</td>
                </tr>
                <tr>
                    <td>lineSeparator</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Separator for long lines. If a text consists of short lines only, it will be surrounded by &lt;pre&gt;...&lt;/pre&gt;. Default is "&lt;p&gt;".</td>
                    <td>Rtexpr. Only for text. Current implementation is buggy: separator is added before every long line,
        instead of between every long line.</td>
                </tr>
                <tr>
                    <td>longLineLength</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>The length of a long line. If a text contains long lines, it will be printed differently. See
        lineSeparator. Default is "30"</td>
                    <td>Rtexpr. Only for text.</td>
                </tr>
                <tr>
                    <td>maxLength</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>The maximum length (number of characters) to print. Longer output is cut off, and an ellipsis is
        added to indicate the cut. If not set (default), there is no maximum.</td>
                    <td>Rtexpr. Only applies for char[] AND if it is not already HTML formatted (cfr. html).</td>
                </tr>
                <tr>
                    <td>ellipsis</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>The character string to print to indicate that the text extended the maxLength. Default is "...". The
        final printed string, including the ellipsis, will not exceed maxLength.</td>
                    <td>Rtexpr</td>
                </tr>
                <tr>
                    <td>ellipsisLength</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>The equivalent character length of ellipsis. By default, this is the number of characters in
        ellipsis. But if ellipsis is e.g. HTML code, then that is not appropriate.</td>
                    <td>Rtexpr. 
Example, the ellipsis is an image of approx 3 characters wide. ellipsis="&lt;img src='icon.gif' width='10' height='10'&gt;" ellipsisLength="3"</td>
                </tr>
                <tr>
                    <td>addTitle</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>If "true", add an HTML tooltip with the value, to the printed output. If "auto", add tooltip only if
        the printed output is cut (cfr maxLength). Default is "false". </td>
                    <td>Rtexpr. Note: implementated by producing as output: &lt;span title="printVar"&gt;possibly-cut-printVar&lt;/span&gt; </td>
                </tr>
                <tr>
                    <td>default</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>The character string to print if the expr results in a NULL value. Default is default="" (i.e.
        zero-length string)
        Support not available for: date, "choice" = ptr, set, setCharEnum</td>
                    <td>Rtexpr</td>
                </tr>
                <tr>
                    <td>empty</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>The character string to print if the normal printed output would be empty (i.e. zero-length string).
        Therefore, this is also used for case expr=NULL and default="".</td>
                    <td>Rtexpr</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>
            </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">
      <mak:value expr="p.name"/>
      <mak:value expr="p.surname"/>
      <mak:value expr="p.birthdate" var="birth" printVar="printBirth"/>
      <% // we only print the birthdate if it's after some date
           if ( ((java.util.Date)birth).after(new java.util.Date(1980, 0, 1)) ) {
               out.print(printBirth);
           }
      %>
      <mak:value expr="s.person.favoriteQuote" maxLength="60" addTitle="auto" />
  </mak:list>
      ]]>
  </source>    </section>
        <section id="seeAlso">
            <title>See also</title>
            <ul>
                <li>
                    <a href="/doc/taglib/maklist.html">mak:list</a>
                </li>
                <li>
                    <a href="/doc/taglib/makobject.html">mak:object</a>
                </li>
                <li>
                    <a href="/doc/taglib/makoption.html">mak:option</a>
                </li>
            </ul>
        </section>
    </body>
</document>