Fluent builder for rendering an ExtraField as an HTML form control, with the value, CSS classes, name attributes and kcode selection flag configured through chained setter methods before calling html(). An instance is created by ExtraField.render() and is scoped to a single rendering call - it is not reused.

Group: Custom Fields


Methods

value(Object v)

Returns: ExtraFieldRenderer

Sets the value to render into the form control.

ParameterDescription
vthe value to render

extraClasses(String v)

Returns: ExtraFieldRenderer

Sets additional CSS classes to add to the rendered form control.

ParameterDescription
vthe additional CSS classes

namePrefix(String v)

Returns: ExtraFieldRenderer

Sets a prefix to prepend to the rendered form control's name attribute.

ParameterDescription
vthe name prefix

nameOverride(String v)

Returns: ExtraFieldRenderer

Overrides the name attribute the form control would otherwise be rendered with.

ParameterDescription
vthe name to use instead of the field's own name

kcodeSelection(Boolean kcodeSelection)

Returns: ExtraFieldRenderer

Sets whether the rendered form control should present kcode-based selection.

ParameterDescription
kcodeSelectiontrue to render kcode selection

html()

Returns: String

Renders the field to HTML using the values configured on this renderer, with no owning entity.

html(Relational owner)

Returns: String

Renders the field to HTML using the values configured on this renderer. Tries the admin/extraField.html Velocity template first, and if that fails falls back to building the markup directly in Java: a select if options are configured, a file upload widget if the field is a file upload, or a text input or textarea otherwise depending on the rows setting.

ParameterDescription
ownerthe entity that owns the field's value, made available to the Velocity template, may be null
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.