<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//MAKUMBA//DTD Documentation V2.0//EN" "document-v20-mak.dtd"><document>
    <header>
        <title>mak:editForm tag documentation</title>
    </header>
    <body>
        <section id="description">
            <title>Description</title>
            <p class="tagDescription">Makes a form for editing the object indicated by any of the labels of the mandatory enclosing &lt;mak:object&gt; or &lt;mak:list&gt;. Also linked objects can be edited through the same form.</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>object</td>
                    <td class="center required">true</td>
                    <td class="center">false</td>
                    <td>The label of the OQL object to edit</td>
                    <td>Fixed, mandatory.</td>
                </tr>
                <tr>
                    <td>handler</td>
                    <td class="center">false</td>
                    <td class="center">false</td>
                    <td>the Java method that handles the response</td>
                    <td>Arguments: (Dictionary formFields, Attributes restOfArguments, Database db) 
Not mandatory. A form without handler will simply set attributes (as makumba objects) for the next page</td>
                </tr>
                <tr>
                    <td>action</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>the response page of the form</td>
                    <td>Mandatory if a &lt;mak:action&gt; is absent</td>
                </tr>
                <tr>
                    <td>method</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>the HTTP method (get or post)</td>
                    <td>Defaults to get</td>
                </tr>
                <tr>
                    <td>name</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>the name of the form</td>
                    <td/>
                </tr>
                <tr>
                    <td>message</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>the message that is displayed in the response page upon success</td>
                    <td>Fixed. Defaults to "changes done".</td>
                </tr>
                <tr>
                    <td>annotation</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Indicates that validation whether errors should be shown in the form, or be displayed in the &lt;mak:response/&gt;.</td>
                    <td>Taken into account only if reloadFormOnError is not set to false.
Values are none (displayed in &lt;mak:response/&gt;), before (before the input), after (after the input) or both (displayed both before and after the input). Defaults to none. </td>
                </tr>
                <tr>
                    <td>annotationSeparator</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Fixed. Prints the given separator between the annotation and the input field.</td>
                    <td>Also HTML can be used, e.g. printing an error icon.</td>
                </tr>
                <tr>
                    <td>reloadFormOnError</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Indicates whether the form page shall be reloaded on an error, or the specified form action page will be loaded directly.</td>
                    <td>Fixed. Values are true or false; defaults to false.</td>
                </tr>
                <tr>
                    <td>clientSideValidation</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Controls whether client side validation shall be used.</td>
                    <td>Rtexpr. Values are false (off), true (on submission) or live (while tpying).</td>
                </tr>
                <tr>
                    <td>target</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td rowspan="3" class="generic">Form-specific HTML tag attribute</td>
                    <td rowspan="3" class="generic">The content is copied to the resulting &lt;form...&gt; tag. Careful with (escaping) quotes.</td>
                </tr>
                <tr>
                    <td>onReset</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onSubmit</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>styleId</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Generic HTML tag attribute</td>
                    <td>results in id="..."</td>
                </tr>
                <tr>
                    <td>styleClass</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td>Generic HTML tag attribute</td>
                    <td>results in class="..."</td>
                </tr>
                <tr>
                    <td>style</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                    <td rowspan="13" class="generic">Generic HTML tag attribute</td>
                    <td rowspan="13" class="generic">The content is copied to the resulting html tag. Careful with (escaping) quotes.</td>
                </tr>
                <tr>
                    <td>title</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onClick</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onDblClick</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onKeyDown</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onKeyUp</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onKeyPress</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onDblClick</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onMouseDown</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onMouseUp</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onMouseMove</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onMouseOut</td>
                    <td class="center">false</td>
                    <td class="center">true</td>
                </tr>
                <tr>
                    <td>onMouseOver</td>
                    <td class="center">false</td>
                    <td class="center">true</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/maknewForm.html">mak:newForm</a>
                </li>
                <li>
                    <a href="/doc/taglib/makaddForm.html">mak:addForm</a>
                </li>
                <li>
                    <a href="/doc/taglib/makeditForm.html">mak:editForm</a>
                </li>
                <li>
                    <a href="/doc/taglib/makdeleteLink.html">mak:deleteLink</a>
                </li>
                <li>
                    <a href="/doc/taglib/makdelete.html">mak:delete</a>
                </li>
            </ul>
        </section>
      <section id="example">
        <title>Example</title>
        <source>
      <![CDATA[
<mak:object from="best.Student s, s.person p" where="s=$student">
    <mak:editForm object="s" action="studentView.jsp" method="post">
        <mak:input name="person.name"/>
        <mak:input name="person.surname"/>
        <mak:input name="graduated"/>
    </mak:editForm>
</mak:object>
      ]]>
  </source>
    </section>  </body>
</document>