hi,

I want to perform some task like changing the background color of numberspinner if there is change in the value.

following is my code snippet:
<tr>
<td class="tdLabel">
<fmt:message key="T1"/>:
</td>
<td>
<form:input id="begin" path="begin"/>
<script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration({
elementId : "begin",
widgetType : "dijit.form.NumberSpinner",

widgetAttrs : {
onChange :SomethingChanged,
smallDelta:"1",


constraints:{max:500,


min:0,
places:0},
required : true,
readOnly:false}}));



</script>




<form:errors path="begin" cssClass="error"/>
</td>
</tr>

where my somthingchange function is simple, just for debug purpose
function SomethingChanged()
{
console.log('SomethingChanged newvalue');
}

Right now I am facing the problem with spring is my function:SomethingChanged is getting called for 1st time when Spring.ElementDecoration is initialized for every page refresh even though there is no change in the value which I don't want in my case. What I want is it should get invoke only when there is actual change in the value. Once it is initialized it works fine for me, like once it is initialized it get invokes only if there is change in the value.

Any one has suggestion on how to handle my requirement?