-
Notifications
You must be signed in to change notification settings - Fork 6
Edit View Layout
mmorton edited this page Aug 18, 2010
·
3 revisions
The layout for a detail view is described by a list of layout definitions. There are primarily two types of layout definitions: section definitions, and field definitions.
This definition describes a new section to be displayed. The detail view always have one default section and any additional ones are rendered sequentially, in order of access, after the default section. There are a number of options that control how the section will be displayed.
-
as: A list of child layout definitions to use. -
options: A set of options to describe the section.-
title: The title to be displayed for the section. -
list: true to render the section as a list, false to render it as a field set.
-
This definition describes a field to be displayed. There are a number of options that control how the property will be displayed.
-
label: A label to be displayed. -
name: The name of the field, in dot-path notation, to be displayed. -
type: The type of control to use. -
validator: A validator definition to use. Can be one of the following:- A RegExp instance.
- A function that accepts a value, and an optional editor instance, and returns false when valid or a string with the error message when not valid.
- An object with the following properties:
-
fn: A function to use for validation (see function option above). -
test: A RegExp to use for validation (see RegExp option above). -
message: A message to use if validation falis. Can be a format string that accepts a value and a field (in that order) or a function that accepts a value and a field (in that order) and returns a string with the error message.
-
These options pertain to a field with a type of text.
-
validationTrigger: The trigger to use for validation. Can be set to false, or nothing, for explicit validation, or one of the following options:-
keyup: Validation occurs on key up. -
blur: Validation occurs when the field is blured.
-
-
validInputOnly: The field will only accept valid input.