|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--MoreMotionAjaxManager
Manager Class that provides static methods for Ajax functionalities. A static object of this class
is avaialable with name AjaxMgr.
var AjaxMgr = new MoreMotionAjaxManager();
| Constructor Summary | |
MoreMotionAjaxManager()
|
|
| Method Summary | |
void
|
cancelRequest(controlId)
Cancels the previously sent request with the specified controlId |
void
|
clearOptions(elmid, soq)
Clears the options of an HTML SELECT Element.
|
void
|
customRefresh(prm)
This method utilizes the AjaxRequest class to send a XMLHttpRequest to the AjaxActionService on the server. |
Object
|
executeAjaxCommand(prm)
Executes the specified Ajax Command on the server. |
void
|
refreshAreas(prm)
Refreshes only a part or parts of a page without making a new request for the whole page. |
void
|
refreshBlocks(prm)
Refreshes the records of the specified ProcessBlock elements in the current page. |
void
|
refreshFields(prm)
Refreshes the values of HTML Elements or ProcessField objects. |
void
|
refreshOptions(prm)
Refreshes the options of an HTML SELECT Element with the current data acquired
from a MoreMotion Data Source.
|
boolean
|
submitProcessForm(prm)
Prepares an Ajax request out of the specified process form and submits it as an XMLHtttpRequest. |
| Constructor Detail |
MoreMotionAjaxManager()
| Method Detail |
void cancelRequest(controlId)
controlId - The control Id of the request to cancel
void clearOptions(elmid, soq)
SELECT Element.elmid - The id of the SELECT Element (ComboBox or ListBox)
soq - Static Options Quantity. The number of the options on the top of the list that should be preserved while clearing the others.
void customRefresh(prm)
prm - The parameters object. The AjaxActionService class invokes the configured data service and prepares an AjaxResponse out of the ADOM prepared by it. The AjaxResponse received from the service should be handled by a custom handler function. actionParams configuration element in the MoreMotion configuration. 'p1=p1val&p2=p2val' form or a properties object in {p1:'p1val',p2:this.value} form prm.actionName property. Example:
AjaxMgr.customRefresh({
actionName : 'RefreshModelNames'
,requestParams : 'CAT=' + this.value
});
<actionParams name="RefreshModelNames">
<dataSource>model_names</dataSource>
<nodesToEncrypt>ID</nodesToEncrypt>
<responseHandler>MyResponseHandler</responseHandler>
</actionParams>
Object executeAjaxCommand(prm)
prm - The parameter object 'p1=p1val&p2=p2val' form or a properties object in {p1:'p1val',p2:this.value} form Example:
AjaxMgr.executeAjaxCommand({
commandName : 'CartProds',
requestParams : 'CAT=' + category,
busyImage : 'bimg1'
});
void refreshAreas(prm)
prm - The parameter object actionParams configuration element in the MoreMotion configuration. 'p1=p1val&p2=p2val' form or a properties object in {p1:'p1val',p2:this.value} form mo:pageInfo attribute. Example:
AjaxMgr.refreshAreas({
actionName : '/RefreshDetails'
,targetAreas : 'Details'
,requestParams : 'CAT=' + category
,busyImage : 'bimg1'
});
Configuration:
<actionParams name="RefreshDetails">
<sourceAreas>/AjaxSourcePage1.Details</sourceAreas>
</actionParams>
void refreshBlocks(prm)
prm - The parameters object. actionParams configuration element in the MoreMotion configuration. processFieldName:dataNodeName,[processFieldName:dataNodeName ...] format. ORDER_ID:ID,UNIT_PRICE:PRICE 'p1=p1val&p2=p2val' form or a properties object in {p1:'p1val',p2:this.value} form Example:
AjaxMgr.refreshBlocks({
actionName : 'RefreshFormRecords'
,targetBlocks : 'PF1.ProductsPB,PF2.Customers'
,requestParams : 'ID=' + this.value
});
Configuration:
<actionParams name="RefreshFormRecords">
<dataSources>products,customers</dataSources>
<nodesToEncrypt>ID</nodesToEncrypt>
</actionParams>
void refreshFields(prm)
prm - The parameters object. actionParams configuration element in the MoreMotion configuration. NAME/ID,STOCK,PRICE 'p1=p1val&p2=p2val' form or a properties object in {p1:'p1val',p2:this.value} form Example:
AjaxMgr.refreshFields({
actionName : 'RefreshProductFields'
,dataNodes : 'NAME/ID,STOCK,PRICE'
,targetElements : 'PROD_SBOX,STOCK,PRICE'
,requestParams : 'ID=' + this.value
});
Configuration:
<actionParams name="RefreshProductFields">
<dataSource>product_details</dataSource>
<nodesToEncrypt></nodesToEncrypt>
</actionParams>
void refreshOptions(prm)
SELECT Element with the current data acquired
from a MoreMotion Data Source.
This method utilizes the AjaxRequest class to send a XMLHttpRequest to the MoreMotion Ajax Service
on the server.prm - The parameters object actionParams configuration element in the MoreMotion configuration. SELECT Element (ComboBox or ListBox) 'p1=p1val&p2=p2val' form or a properties object in {p1:'p1val',p2:this.value} form SELECT Element is refreshed. The function receives MultiPartAjaxResponse object as the parameter. Example:
AjaxMgr.refreshOptions({
actionName : 'RefreshCities'
,optionNode : 'NAME'
,valueNode : 'ID'
,targetElement : 'x123'
,requestParams : 'CAT=' + this.value
});
Configuration:
<actionParams name="RefreshCities">
<dataSource>cities_of_country</dataSource>
<valueNode>ID</valueNode>
<encryptTheValue>true</encryptTheValue>
</actionParams>
boolean submitProcessForm(prm)
prm - The Parameters Object 'p1=p1val&p2=p2val' form or a properties object in {p1:'p1val',p2:this.value} form SELECT Element is refreshed. The function receives MultiPartAjaxResponse object as the parameter. Note: Parameters requiredBlocks, beforeSubmitFunc, validateInput, confirmMessageand busyImage can also be defined in the mo:props attribute of a ProcessCommand element. If that is the case these parameters can be omitted here.
Example:
AjaxMgr.submitProcessForm({
formName : 'PF1'
,commandName : 'Delete'
,requestParams : 'CAT=' + this.value
,busyImage : 'Busy1'
});
true if form is submitted false if submittion is cancelled because of a validation error.
|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||