Taglib documentation for tag mak:input#
Description#
An input field to be created, depending on the makumba type of the field.
Set and pointer inputs will render as select boxes. Sometimes you may need to use two select boxes whereby the user can move items from one box to the other, which is illustrated in this example.
Date inputs are slightly different than normal inputs, as they are rendered with several input fields (for the day, month, year, hours, minutes and second, depending on the date/time format). Additionally, a JavaScript-based calendar widget can be used, as shown in an example.
The difference between <mak:input> and normal HTML <input> in a makumba form are:
- <mak:input> produces objects prepared for setting/comparing makumba fields (e.g. Pointer, Date, Text).
- the fields produced by <input> will be available as page $attributes but will all be of type String
- the fields produced by <mak:input> are available separately as a Dictionary to the handler method

Attributes#
Name | Required | Runtime expression | Description | Comments |
---|---|---|---|---|
field | false | false | Makumba field (from the edited record or via base pointers or sub-record pointers)
.![]() |
Either name or field attribute mandatory
.![]() |
name | false | false | Makumba field (from the edited record or via base pointers or sub-record pointers)
.![]() |
Either name or field attribute mandatory
.![]() |
value | false | false | MQL expression relative to enclosing query tags or a $attribute computed previously in the page (with <mak:value var=.../>, pageContext.setAttribute(...), or read by in the previous page by an <mak:input />)
.![]() |
. ![]() |
default | false | true | FIXME
.![]() |
. ![]() |
empty | false | true | FIXME
.![]() |
. ![]() |
dataType | false | false | The makumba type of the data (needed if there is no value, no default expression for the value, or no makumba type associated with an attribute)
.![]() |
Can be char, char[xx], int, date, text, ptr Type, set Type
.![]() |
display | false | true | If "false", it will not show the <input> but it will expect to read it in the next page. This allows the page designer to format the input control manually
.![]() |
. ![]() |
format | false | false | Format string, according to java.text.SimpleDateFormat Can only countain d, M, y, H, m, s formatting chars, and any kind of separators. Ex: 'the day' dd 'of the month' MMMM 'in the year' yyyy. Default is "dd MMMM yyyy"
.![]() |
Only for date.
.![]() |
type | false | false | HTML INPUT type to be used
.
![]() |
. ![]() |
stepSize | false | false | For int data with type select or radio, the step size defines the steps between each option. The default stepsize is 1.
.![]() |
Only for int with type=select/radio.
.![]() |
calendarEditor | false | false | Whether to generate code for a calendar editor.
.![]() |
Only for date types. Defaults to true resp. the default value specified in the Makumba configuration.
.![]() |
calendarEditorLink | false | false | The formatting that appears on the link to the calendar date-chooser.
.![]() |
Only for date types. Defaults to <img border="0" src="_CONTEXT_PATH_/mak-tools/makumbaResources/image/calendar.gif">
.![]() |
autoComplete | false | false | Enables auto-completion
.![]() |
Works only for char and ptr.
.![]() |
size | false | true | Size of the input control
.![]() |
Only for char, int (size of the textbox) and set, ptr (height of the select)
.![]() |
maxlength | false | true | Max length of a text control
.![]() |
Only for char and int. Defaults to makumba width of the char
.![]() |
rows | false | true | Number of textarea rows and columns
.![]() |
only for text
.![]() |
cols | false | true | Number of textarea rows and columns
.![]() |
only for text
.![]() |
nameVar | false | false | The name of the java variable in which to store the name of the HTML input. In multiple forms, there may be more HTML inputs generated by one mak:input, so a suffix is added by makumba to the name to generate unique names for each.
.![]() |
. ![]() |
nullOption | false | false | A text that would be displayed as the "null option" in drop-down boxes, i.e. to add a null value to the other possible options. May be used to allow a ptr to be set to null, and/or require a deliberate action from the users to select a value, rather leaving the default (first) value selected.
.![]() |
Only for ptr and intEnum types
.![]() |
labelSeparator | false | true | The string that separates the tickbox (radio/check) from the label. Default is " " (space). The output will be < tick >< labelSeparator >< label >
.![]() |
Only for type="tickbox"
.![]() |
elementSeparator | false | true | The string that separates the different options. Default is " " (space). The output will be < [x] label >< elementSeparator >< [x] label >
.![]() |
Only for type="tickbox"
.![]() |
clearDefault | false | true | Enable this to hide the default text of an input onFocus and display it again onBlur if nothing has been entered.
.![]() |
. ![]() |
accessKey | false | true | Input-specific HTML tag attribute
(generic) |
The content is copied to the resulting <input...> tag. Careful with (escaping) quotes.
(generic)
|
disabled | false | true | ||
onChange | false | true | ||
onBlur | false | true | ||
onFocus | false | true | ||
onSelect | false | true | ||
tabIndex | 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:form, mak:newForm, mak:addForm, mak:editForm, mak:deleteLink, mak:delete
Examples#
<mak:object from="company.Employee e" where="e=$employee"> <mak:editForm object="e" action="employeeView.jsp" method="post"> Name <mak:input name="name"/> Surname <mak:input name="surname"/> Gender <mak:input name="gender" type="tickbox" /> DOB <mak:input name="birthdate" format="yyyy-MM-dd" /> Projects <mak:input name="projects" type="seteditor"/> </mak:editForm> </mak:object>
