|
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 available 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(<CustomRefreshProps> props)
This method utilizes the AjaxRequest class to send a XMLHttpRequest to the AjaxActionService on the server. |
Object
|
executeAjaxCommand(<ExecuteAjaxCommandProps> props)
Executes the specified Ajax Command on the server. |
void
|
executeMScript(<ExecuteMScriptProps> props)
Executes MScript codes on the server. |
Object
|
getEncosingAreaName(node)
|
Object
|
openFlowin(props)
Creates a Floating Window and refreshes the embedded "TargetArea" in it using a "SourceArea". |
void
|
refreshAreas(<RefreshAreasProps> props)
Refreshes only a part or parts of a page without making a new request for the whole page. |
void
|
refreshBlocks(<RefreshBlocksProps> props)
Refreshes the records of the specified ProcessBlock elements in the current page. |
void
|
refreshFields(<RefreshFieldsProps> props)
Refreshes the values of HTML Elements or ProcessField objects. |
void
|
refreshOptions(<RefreshOptionsProps> props)
Refreshes the options of an HTML SELECT Element with the current data acquired
from a MoreMotion Data Source.
|
Boolean
|
submitProcessForm(<SubmitProcessFormProps> props)
Prepares an Ajax request out of the specified process form and submits it as an XMLHtttpRequest. |
void
|
viewState(<ViewStateProps> props)
This method is used to store/retrieve states of browser user controls to/from MoreMotion Page Variables on the server with XMLHttpRequest |
| 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(<CustomRefreshProps> props)
props - The CustomRefreshProps 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. 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(<ExecuteAjaxCommandProps> props)
props - The ExecuteAjaxCommandProps parameter object Example:
AjaxMgr.executeAjaxCommand({
commandName : 'CartProds',
requestParams : {CAT: category},
busyImage : 'bimg1'
});
void executeMScript(<ExecuteMScriptProps> props)
props - The ExecuteMScriptProps parameter object. Example: AjaxMgr.executeMScript({
actionName : 'SetGetVars'
,requestParams : {TABNAME: 'T1'}
,callbackFunc : RetrieveVars
});
function RetrieveVars(mpar) {
var docroot = mpar.getResultField("DOC_ROOT");
}
Configuration:
<actionParams name="SetGetVars">
<mscript>
@set(s:TABNAME,i:TABNAME)
@setResultField(DOC_ROOT,s:DOC_ROOT)
</mscript>
</actionParams>
Object getEncosingAreaName(node)
Object openFlowin(props)
props - The parameter object Example:
AjaxMgr.openFlowin({
name : 'UserInfo'
,title : 'Update User Information'
,width : 300
,height : 200
,refElm : elm
,requestParams : {USER: userId}
,busyImage : 'bimg1'
});
Configuration:
<actionParams name="RefreshDetails">
<sourceAreas>/AjaxSourcePage1.Details</sourceAreas>
</actionParams>
void refreshAreas(<RefreshAreasProps> props)
<actionParams><sourceAreas> elements.
This method utilizes the AjaxRequest class to send a XMLHttpRequest to the MoreMotion Ajax Service
on the server.props - The RefreshAreasProps parameter object Example:
AjaxMgr.refreshAreas({
actionName : '/RefreshDetails'
,targetAreas : 'Details'
,requestParams : {CAT: category}
,busyImage : 'bimg1'
});
Configuration:
<actionParams name="RefreshDetails">
<sourceAreas>/AjaxSourcePage1.Details</sourceAreas>
</actionParams>
void refreshBlocks(<RefreshBlocksProps> props)
props - The RefreshBlocksProps parameters object. 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(<RefreshFieldsProps> props)
props - The RefreshFieldsProps parameters object. 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(<RefreshOptionsProps> props)
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.props - a RefreshOptionsProps parameters object 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(<SubmitProcessFormProps> props)
props - The SubmitProcessFormProps parameters Object Note: Props requiredBlocks, beforeSubmitFunc, validateInput, confirmMessageand busyImage can also be defined in the mo:props attribute of a ProcessCommand element. If that is the case these props can be omitted here.
Example:
AjaxMgr.submitProcessForm({
formName : 'PF1'
,commandName : 'Delete'
,requestParams : {CAT: this.value}
,busyImage : 'Busy1'
});
true if form is submitted false if submission is canceled because of a validation error.
void viewState(<ViewStateProps> props)
props - The ViewStateProps parameter object Examples:
AjaxMgr.viewState({
getVars : 'ScrollPosition,SliderIsOpen',
callbackFunc : function(vars) {alert(vars.ScrollPosition + " " + vars.SliderIsOpen)}
});
AjaxMgr.viewState({
setVars : {ScrollPosition:1, SliderIsOpen:document.getElementById('x123').checked}
});
|
MoreMotion Face API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||