Some Useful JavaScript Functions
Following are the list of JavaScript functions which can be used with vroom-config.xml file, while writing script type calls:
VroomUtils.triggerEvent(elemId, event); // This method can be used to trigger events of an element. E.g. VroomUtils.triggerEvent('btnSubmit', 'onclick');VroomUtils.populateSelect(elemId, jsonString); // This method is used to populated Select from JSON string, the JSON string must be array of net.openkoncept.vroom.bean.LabelValueBean object.VroomUtils.populateSelect(elemId, jsonString, labelVar, valueVar); // The method is similar to the above method except jsonString can be array of any Java Bean, the labelVar and valueVar are the java * bean properties.VroomUtils.generateRadioGroup(elemId, name, jsonString, cols, styleClass); // This method is used to generate a radio group. The cols is used to specify the no. of radio buttons in one line. The styleClass is CSS class to decorate the radio buttons. The jsonString must be array of net.openkoncept.vroom.bean.LabelValueBean.VroomUtils.generateRadioGroupEx(elemId, name, jsonString, labelVar, valueVar, cols, styleClass); // This method is similar to the above method except jsonString can be array of any Java Bean, the labelVar and valueVar are the java bean properties.VroomUtils.generateCheckBoxGroup(elemId, name, jsonString, cols, styleClass); // This method is used to generate check box group. The cols is used to specify the no. of radio buttons in one line. The styleClass is CSS class to decorate the radio buttons. The jsonString must be array of net.openkoncept.vroom.bean.LabelValueBean.VroomUtils.generateCheckBoxGroupEx(elemId, name, jsonString, labelVar, valueVar, cols, styleClass); // This method is similar to the above method except jsonString can be array of any Java Bean, the labelVar and valueVar are the java bean properties.VroomUtils.getElement(elemIdOrName); // This method finds the element by name. If the element is not found, it finds it by id.VroomUtils.getElementByTagName(tagName); // This method is used to return on the first element of the array of elements of the specified tag name.VroomUtils.getElementsByTagName(tagName); // This method returns array of elements of specified tag name.JSON.parse(jsonString); // This method takes a jsonString and returns the JSON object.
Read more about this topic: Vroom Framework
Famous quotes containing the word functions:
“Let us stop being afraid. Of our own thoughts, our own minds. Of madness, our own or others. Stop being afraid of the mind itself, its astonishing functions and fandangos, its complications and simplifications, the wonderful operation of its machinerymore wonderful because it is not machinery at all or predictable.”
—Kate Millett (b. 1934)