new PicassoField()
The default field implementation
- Source:
Members
-
<protected> _element :HTMLElement
-
The html of the field
Type:
- HTMLElement
- Source:
-
<protected> _formIgnore :boolean
-
If this field is ignored in a form final value
Type:
- boolean
- Source:
-
<protected> _id :string|number
-
The id of the field
Type:
- string | number
- Source:
-
<protected> _label :string
-
The field label
Type:
- string
- Source:
-
<protected> _required :boolean
-
The flag to mark this field as required
Type:
- boolean
- Source:
-
<protected> _type :string
-
The type of this field
Type:
- string
- Source:
-
<inner> htmlUtils :utils/html
-
The html utils
Type:
- utils/html
- Source:
-
<inner> Sequence :Picasso.core.Sequence
-
Sequence manager
Type:
- Source:
Methods
-
addClass(_class)
-
Add one or more classes (separated by space) to the field
Parameters:
Name Type Description _class
string - Source:
-
<abstract> build(field)
-
Builds the field
Parameters:
Name Type Description field
Picasso.pjo.Field - Source:
Throws:
-
getHTMLElement() → {HTMLElement}
-
Get the HTMLElement of this field
- Source:
Returns:
- Type
- HTMLElement
-
getId() → {string|number}
-
Get this field id
- Source:
Returns:
- Type
- string | number
-
getLabel() → {string}
-
Get the field label
- Source:
Returns:
- Type
- string
-
getType() → {string}
-
Get the field type
- Source:
Returns:
- Type
- string
-
<abstract> isEmpty() → {boolean}
-
Verifies if the field is empty or not
- Source:
Throws:
Returns:
- Type
- boolean
-
isFormIgnored() → {boolean}
-
Verify if the field is ignored in the form
- Source:
Returns:
- Type
- boolean
-
isRequired() → {boolean}
-
Verify if the field is required
- Source:
Returns:
- Type
- boolean
-
removeClass(_class)
-
Removes one or more classes (separated by space) to the field
Parameters:
Name Type Description _class
string - Source:
-
<abstract> reset()
-
Resets the field
- Source:
Throws:
-
setHTMLElement(element)
-
Sets the HTMLElement of this field
Parameters:
Name Type Description element
HTMLElement - Source:
-
setId(id)
-
Sets this field id, if not is given generates the id based on a sequence
Parameters:
Name Type Description id
string | number - Source:
-
<abstract> value(val)
-
Returns or sets the value of a field
Parameters:
Name Type Description val
* - Source:
Throws: