Amiro.CMS JS API Reference (available from v5.12) Amiro.Ru / Manual

Class AMI.ModuleComponentForm

Form component class.
Defined in: AMI.ModuleComponentForm.js.

Class Summary
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 Summary
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}

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Apr 22 2011 12:43:56 GMT+0700 (NOVST)