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

Class AMI.Page

Static object for page actions and data handling.
Defined in: AMI.Page.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Static object that manages page parameters such as url (storing modules variables in hash), actions etc.
Method Summary
Method Attributes Method Name and Description
<static>  
AMI.Page.addHashData(moduleId, Set)
Add set of data for module that will be stored to url hash.
<static>  
AMI.Page.doModuleAction(moduleId, componentId, action, mParameres)
Detect module by action event, collect required parameters and call AMI.ModuleComponent.processModuleAction method to process action.
<static>  
AMI.Page.getFormValues(oForm)
Get form values as associative array like browser does in GET request.
<static>  
AMI.Page.getHashData(moduleId)
Get pairs of names and values from hash for module.
<static>  
Split search part of GET url and return variables as associative array.
<static>  
AMI.Page.loadHashData()
Get url hash string and parse into parameters for each module.
<static>  
AMI.Page.registerModule(oModule)
Register module in AMI.Page object.
<static>  
AMI.Page.setHash()
Store has string with data of all modules in url.
Class Detail
AMI.Page()
Static object that manages page parameters such as url (storing modules variables in hash), actions etc.
Method Detail
<static> {void} AMI.Page.addHashData(moduleId, Set)
Add set of data for module that will be stored to url hash.
Parameters:
{string} moduleId
Module id for which parameters will be saved, e.g. "news".
{object} Set
of names and values that will be added/created in has for module. Format: {name1:value1, name2:value2}. If parameter with name already exists it will be overwriten.
Returns:
{void}

<static> {void} AMI.Page.doModuleAction(moduleId, componentId, action, mParameres)
Detect module by action event, collect required parameters and call AMI.ModuleComponent.processModuleAction method to process action.
Parameters:
{string} moduleId
Module id for which module object is created.
{string} componentId
Component id of module. Could be empty.
{string} action
Requested module action.
{mixed} mParameres
A list of parameters that will be passed to action processing. If type of mParamerets is "object" mParameters will be filled with FORM field values (if object tag name is FORM) or mParameters.value (otherwise).
Returns:
{void}

<static> {object} AMI.Page.getFormValues(oForm)
Get form values as associative array like browser does in GET request.
Parameters:
{DOM object} oForm
Object of form which parameters will be collected.
Returns:
{object} Associative array of field names and their values in format {name1:value1, name2:value2, etc..}.

<static> {object} AMI.Page.getHashData(moduleId)
Get pairs of names and values from hash for module.
Parameters:
{string} moduleId
Module id for which data will be returned.
Returns:
{object} Object in format {name1:value1, name2:value2, etc..}.

<static> {object} AMI.Page.getParametersFromString(str)
Split search part of GET url and return variables as associative array.
Parameters:
{string} str
GET variables string like "a=b&c=d";
Returns:
{object} Associative array of variables.

<static> {void} AMI.Page.loadHashData()
Get url hash string and parse into parameters for each module.
Returns:
{void}

<static> {void} AMI.Page.registerModule(oModule)
Register module in AMI.Page object. This is used for action processing and url hash operating.
Parameters:
{AMI.Module} oModule
Page module object.
Returns:
{void}

<static> {void} AMI.Page.setHash()
Store has string with data of all modules in url.
Returns:
{void}

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