Hi,I am facing one issue in setValue function in formapi for template. What exactly the situation is that, we have onItemChange event registered for 1 field and function for which sets some value in the field by setValue function. so whenever we are putting the setValue function it triggers the onItemChange and again the setValue comes and becomes an infinite loop. Earlier the code was working fine on server. Due to migration to other (VM) servers this code is failing. Any idea what can be the issue?IWEventRegistry.addItemHandler("/rightHtmlFragment/htmlFragment", "onItemChange", onChangeOfFragment);function onChangeOfFragment(item) { alert("Some Alert"); item.setValue("Some Value");}
function onCheangeOfFragment(item) { var val = item.getValue(); if (val != "Some Value") { item.setValue("Some Value"); ... } ...}
Not sure exactly what's happening - but you should be able to stop the circle by doing something like...