Thanks alot Martin for the prompt reply.
Infact, i found it wrong too, therefore updated the code which is as follows: if(formPanel != null && formPanel.getFields().length > 1) { // Checking length to prevent the control for irrelevant clear calls. DeferredCommand.addCommand(new IncrementalCommand() { public boolean execute() { formPanel.clear(); return (formPanel.getFields().length > 0); } }); } It temporarily resolved the issue but later script error again popped- up. () Also, then i tried to remove the component(s) directly by traversing each from the form panel but again hard luck. Component[] compsArray = formPanel.getComponents(); if(compsArray != null) { for(int i = 0; i < compsArray.length; i++) { Component comp = compsArray[i]; formPanel.remove(comp, true); } } But ,as you mentioned, there is no error while redrawing the same count of components with their respective values from database. Because, Clean-up & Re-Draw are independent events. Is this approach wrong? On Sep 30, 8:21 pm, mars1412 <martin.trum...@24act.at> wrote: > why do you call clear so often? > calling it once should be enough, shouldn't it? > > and if the clear() call takes too long, you have to split it up: > so don't call clear, but instead copy and adjust the code in the clear > function, os that e.g. only 20 of the fields of the form are cleared > at once. > > but I really doubt that clearing 300 fields takes more than 10 secs on > any computer > so maybe there's another problem in your code: > maybe you add fields again, before clearing the existing once has > finished? > > On Sep 30, 6:49 am, Vikas <mevik...@gmail.com> wrote: > > > > > Hi all, > > > I'm a newbie to GWT. > > > Whenever, i try to re-load a Form Panel on Combo Box 'onSelect' event > > then i am getting IE script error that says: > > > "A script on this page is causing Internet Explorer to run slowly. If > > it continues to run, your computer may become unresponsive. Do you > > want to abort the script?" > > > My form panel contains more than 300 fields (Checkbox & TextField). > > > So, in order to reload, first, i clear up the Form Panel and then > > redraw the components on the same and my code as follows: > > > if(formPanel != null) { > > > > > DeferredCommand.addCommand(new IncrementalCommand() { > > > private int > > index = 0; > > > protected static > > final int COUNT = 20; > > > public boolean > > execute() { > > > formPanel.clear(); > > > return (++index < > > COUNT); > > } > > > }); > > } > > > Although, script error got resolved i made changes in Windows > > registry as suggested in the following link: > > > http://gwt-ext.com/forum/viewtopic.php?f=7&t=4180 > > > But, i cannot ask to every user to do the same in their OS. > > > So, i request you to please guide me the right approach to resolve > > the issue. > > > Thanks alot in advance. > > > -Vikas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---