Taglib documentation for tag mak:addForm#
Description#
Makes a form for creating a sub-object of the mandatory enclosing <mak:object> $ rt ; e.g. a language of a student , an address for a person
.
Attributes#
| Name | Required | Runtime expression | Description | Comments |
|---|---|---|---|---|
| object | true | false | The label of the object whose sub-object will be created
.![]() |
Mandatory
.
|
| field | true | false | The field name that denotes the sub-object.
.![]() |
Mandatory
.
|
| action (from mak:form) |
false | true | the response page of the form
.![]() |
Mandatory if a <mak:action> is absent
.
|
| method (from mak:form) |
false | true | the HTTP method (get or post)
.![]() |
Defaults to get
.
|
| name (from mak:form) |
false | true | the name of the form
.![]() |
Optional name of the form, used to identify it by other makumba tags
.
|
| message (from mak:form) |
false | true | the message that is displayed in the response page upon success
.![]() |
Defaults to "changes done".
.
|
| annotation (from mak:form) |
false | true | Indicates whether validation errors should be shown in the form, or be displayed in the <mak:response/>.
.![]() |
Taken into account only if reloadFormOnError is not set to false. Values are none (displayed in <mak:response/>), before (before the input), after (after the input) or both (displayed both before and after the input). Defaults to none.
.
|
| annotationSeparator (from mak:form) |
false | true | Prints the given separator between the annotation and the input field.
.![]() |
Also HTML can be used, e.g. printing an error icon.
.
|
| reloadFormOnError (from mak:form) |
false | true | Indicates whether the form page shall be reloaded on an error, or the specified form action page will be loaded directly.
.![]() |
Values are true or false; defaults to false.
.
|
| clientSideValidation (from mak:form) |
false | true | Controls whether client side validation shall be used.
.![]() |
Values are false (off), true (on submission) or live (while tpying).
.
|
| multipleSubmitErrorMsg (from mak:form) |
false | true | Enables multiple form submission prevention, and sets the given value as the error message.
.![]() |
.
|
| target (from mak:form) |
false | true | Form-specific HTML tag attribute
(generic) |
The content is copied to the resulting <form...> tag. Careful with (escaping) quotes.
(generic)
|
| onReset (from mak:form) |
false | true | ||
| onSubmit (from mak:form) |
false | true | ||
| styleClass (from mak:form) |
false | true | Generic HTML tag attribute
.![]() |
results in class="..."
.
|
| style (from mak:form) |
false | true | Generic HTML tag attribute
(generic) |
The content is copied to the resulting html tag. Careful with (escaping) quotes.
(generic)
|
| title (from mak:form) |
false | true | ||
| onClick (from mak:form) |
false | true | ||
| onDblClick (from mak:form) |
false | true | ||
| onKeyDown (from mak:form) |
false | true | ||
| onKeyUp (from mak:form) |
false | true | ||
| onKeyPress (from mak:form) |
false | true | ||
| onMouseDown (from mak:form) |
false | true | ||
| onMouseUp (from mak:form) |
false | true | ||
| onMouseMove (from mak:form) |
false | true | ||
| onMouseOut (from mak:form) |
false | true | ||
| onMouseOver (from mak:form) |
false | true |
See also#
mak:input, mak:form, mak:newForm, mak:editForm, mak:deleteLink, mak:delete
Examples#
<mak:object from="company.Employee e" where="e=$employee">
<mak:addForm object="e" field="projects" action="employeeView.jsp" method="post">
<mak:value expr="e.name"/>
<mak:input name="project"/>
<mak:input name="timePercentage"/>
</mak:addForm>
</mak:object>