I am using a dojo widget that in roo generated .jspx files. Where following is my code parts
<form:select name="halfOrFulDay" id="_monitoringType_id${rowCounter.count}" Style="width:120px" onchange="someProcess()">
<form:option value="--Select--" selected="selected">--Select--</option>
<form:option value="Half Day" >Half Day</option>
<form:option value="Full Day" >Full Day</option>
<form:option value="None" >None</option>
</form:select>
<script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration({elementId : '_monitoringType_id${rowCounter.count}', widgetType: 'dijit.form.FilteringSelect', widgetAttrs : {promptMessage: 'In Complete Data',hasDownArrow : true}})); </script>
My problem is, I am not able to fire onchange event as soon as I applied Spring.addDecoration(). Is there any attribute that i can set within widgetAttrs ? Something like:
widgetAttrs : {onchange : someProcess ,promptMessage: ‘In Complete Data’,hasDownArrow : true}
dijit.form.FilteringSelect is not a regular dom node. It’s a dijit widget…
Its onchange event is attached to a particular dom node of the widget template, and it’s attached to the widget’s extension point called “onChange” (mind the capital C).
Your example should be :
You should read about this here : http://dojotoolkit.org/reference-guide/quickstart/writingWidgets.html#creating-extension-points
For any widgets you use through spring, you will find the corresponding documentation here : http://dojotoolkit.org/api/
Just expand the “dijit” tree node, then select your widget, then have a look at the list of custom events it supports in the “Event summary” section.