Hi,I am new to smartGWT and Am running my application in smartGWT v4.0 and GWT v2.2 in Mozilla v24.0
I have initialized my DateItem and set it into a tool strip as follows:
I have added the ChangedHandler as follows which checks for date change and performs certain validation to show a popup alert. Inside mdfyDate() method i perform certain validation for the selected date (If validation fails i show an error popup, otherwise leave it as such). Now when i select a different date value, whatever logic that I have defined inside OnChanged gets fired thrice [I see three error popups for my failure scenario for the selected date]
I even tried using a boolean flag to return from the onChanged() funtion but it didnt work.
Below mentioned is my logic inside the ChangedHandler:
I have initialized my DateItem and set it into a tool strip as follows:
Code:
DateItem strtDte = new DateItem("strtDte", "<nobr>Start Date</nobr>",true);
ToolStrip startDateStrp = new ToolStrip();
startDateStrp.addFormItem(strtDte);
// Finally I add the tool strip to a VLayout
I even tried using a boolean flag to return from the onChanged() funtion but it didnt work.
Below mentioned is my logic inside the ChangedHandler:
Code:
ChangedHandler strtDtCH = new ChangedHandler() {
public void onChanged(ChangedEvent event) {
bidMo = (String) bidPerd.getValue();
isValid = mdfyDate(bidMonth, (Date)strtDte.getValue());
if(!isValid){
return;
}
}
};