Difference between module simple and multiple
Imagine you have a dynamic application with a list of items. You also want that each item of this list is a module. You have here a module mulitple.
Example of module multiple
Let's say you have a list of buttons (before laoding the script, you don't know exactly how many).
In your HTML file :
<body> <button id="myButton_1">Click me !</button> <button id="myButton_2">Click me !</button> <button id="myButton_3">Click me !</button> ... <button id="myButton_120">Click me !</button> </body>
Take as note that the counter start at 1.
Then in your module configuration file, set the type to multiple and when you wish to tell the framework the binded element has the index in his name, you just have to put [] instead of the number. Example :
<?xml version="1.0" encoding="utf-8"?> <conf model="ModuleModel" controller="ModuleController" view="" dynamicLoad="true" folder="application/module/" version="0.1" type="multiple" compressed="false" > <bind id="myButton_[]" attribute="innerHTML" propertie="buttonValue"/> <bindAsListener id="myButton_[]" event="click" handler="buttonClickHandler"/> </conf>
Then the framework will parse your HTML file and detect the exact number of module (here 120).
So in fact you will have 120 instance of your module. To know in your module what is number of your module, you can use the getWZMultitonId method. Your first module will have index 1 and the last one index 120.
The rest is the same...