getAllModels() |
It retrieves a collection of models defined for the current XForm.
Syntax
Script |
WebForm.getAllModels(sApplicationId) |
Parameters
Parameter |
Description |
---|---|
sApplicationId |
Object that denotes the applicationID of the XForm. |
Return Value
It returns a collection of models.
Example
The following example demonstrates the retrieval of models and their use to clear the data available on all the models.
// retrieve the models collection var allModels = WebForm.getAllModels(sApplicationId); // navigate through the collection and clear data for (var modelId in allModels) { var currentModel = allModels[modelId]; currentModel.clear(); }