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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to