Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    smartgwt validation issues

    Hello

    i have a problem. i use a form to save a new record. after saving, i hope to reset the form. so, my code like..
    Code:
            IButton addButton = new IButton("Save New");   
            addButton.addClickHandler(new ClickHandler() {   
                public void onClick(ClickEvent event) {   
                	addForm.saveData();  
                	addForm.reset();   
                }   
            });
    the problem happen when i use validation. i find that the addForm.reset() will been executed after validate. so, the warning will been refreashed.

    so, i hope that i can reset my form after saving correctly. And, i can show validation warning when i saving incorrectly. How can i do??

    Thank you.
    Last edited by jerome; 30 Dec 2010, 17:35.

    #2
    You shouldn't have to reset anything if you are using a working datasource. If you want to do some custom action after the save, provide a callback to savedata and do the work there.

    Comment

    Working...
    X