I. Overview
FineReport reports use jQuery framework, so you can use each method of jQuery in a template to traverse all report objects and apply unified operations to each object.
II. Instructions
Use $.each(objects,function(i,item){...}); to traverse objects and apply the function on each object.
Each time the function is executed, two parameters are passed: i and item. i represents the position of the current object in the entire object collection (i starts from 0), and item is the object itself.
For example, the code in Reset the Widget Value traverse the widgets in the parameter pane and then reset the value of each widget:
$.each(this.options.form.name_widgets,function(i,item)
{item.reset()});
During the traversal, if the function returns 'false', the loop is terminated (just like using 'break' in a normal loop). If the function returns 'true', it will skip to the next loop (just like using 'continue' in a normal loop).