Class AMI.ModuleComponentForm
Form component class.
Defined in: AMI.ModuleComponentForm.js.
Constructor Attributes | Constructor Name and Description |
---|---|
AMI.ModuleComponentForm(oModule, componentType, componentId)
Class of form component inhertited from AMI.ModuleComponent that load and draws form received from server, and contains methods for submitting form storing actual form state.
|
Method Attributes | Method Name and Description |
---|---|
Method returns current form id and state.
|
|
loadForm(bScrollToForm)
Load form and place to component area.
|
|
submitForm(oParameters)
Submit form and set callback for replace form content when response is received.
|
Class Detail
AMI.ModuleComponentForm(oModule, componentType, componentId)
Class of form component inhertited from AMI.ModuleComponent that load and draws form received from server, and contains methods for submitting form storing actual form state.
- Parameters:
- {AMI.Module} oModule
- Module object.
- {string} componentType
- Type of component (filter_form, form, list).
- {string} componentId
- Id of current component.
Method Detail
{object}
getAppliedData()
Method returns current form id and state. For example this required for rows highligting.
- Returns:
- {object} Returns associative array like {'id': x, 'type': 'edit' or 'new'}.
{void}
loadForm(bScrollToForm)
Load form and place to component area. Also page will be scrolled to form if allowed.
- Parameters:
- {bool} bScrollToForm
- Allow or not to scroll page to form. true by default.
- Returns:
- {void}
{void}
submitForm(oParameters)
Submit form and set callback for replace form content when response is received.
- Parameters:
- {object} oParameters
- Associative array of data that will be posted to server. return_type and mod_id will be automatically added to posted data.
- Returns:
- {void}