<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//MAKUMBA//DTD Documentation V2.0//EN" "document-v20-mak.dtd"><document>
    <header>
        <title>mak:option tag documentation</title>
    </header>
    <body>
        <section id="description">
            <title>Description</title>
            <p class="tagDescription">By default, for pointer and set fields, mak:input will show a choser (selector) that includes the title of all possible options, ordered by that title. To change that behavior, the mak:input can include one or more mak:option. Options can be repeated using mak:list, c:foreach, and in general can appear inside any other tag. 
Text inside mak:option will become an option title. The value attribute will become the option. Text inside the mak:input that is not inside a mak:option amd is not blank (whitespace) will be assumed to separate groups of options and will be rendered. For options that render HTML SELECTs, this is only accepted for multiple SELECTs which will create several SELECT boxes of equal size, one for each option group.

If mak:option doesn't have a value indicated, it will produce a nil option. Such nil options will be ignored at form submission.

If an option value appears many times it will only be shown the first time it occurs.
    </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>value</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>Value of the option, can be an OQL expression or a $attribute</td>
                    <td>Fixed, if not indicated, nil (null option) is default</td>
                </tr>
                <tr>
                    <td>selected</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>Whether this option is selected or not</td>
                    <td>False by default</td>
                </tr>
            </table>
        </section>
    
        <section id="seeAlso">
            <title>See also</title>
            <ul>
                <li>
                    <a href="/doc/taglib/makinput.html">mak:input</a>
                </li>
                <li>
                    <a href="/doc/taglib/maklist.html">mak:list</a>
                </li>
            </ul>
        </section>
      <section id="example">
        <title>Example</title>
        <source>
      <![CDATA[
<mak:input name="some" dataType="ptr T">
    <mak:option>Please choose:</mak:option>
    <mak:list from="T choice" where="someCondition" >
        <mak:option value="choice"><mak:value expr="choice.someField" /></mak:option>
    </mak:list>
    <mak:option> -------- separator----------</mak:option>
    <mak:list from="T choice" where="someOtherCondition" >
       <mak:option value="choice"> <mak:value expr="choice.someField /></mak:option>
    </mak:list>
</mak:input>
      ]]>
  </source>
    </section>  </body>
</document>