Tuesday, July 30, 2013

Re: remove handler of event bus

 same instance again, I mean new object of same class not a singleton instance.

On Tuesday, 30 July 2013 10:47:37 UTC-7, Bhumika Thaker wrote:

Hi All,

My problem is with remove event handler. as I got solution for Dialog box.


but it does not work for case where one instance already open and try to open same instance again.
 Just example: A below scroll panel has handler initialized. it used for document preview.
  class TestScroll extends ScrollPanel
  {
     public TestScroll(){
      
     }
     implemented onload()
      {
         // eventBus.addHandler code here.
       //here some preview related code
      }
     
         unload() method
        {
           //eventBus remove handler code
        }
  }

This preview contain some links which open different preview but with same code and different data structure,
Now  The problem is like  onUnload ( which contains code of remove handler) event does not load ,  because other panel opened. that does not mean previous panel unload.
So in that case, twice event handler registered. when one event fired then other event also fired. 

Due to that, Preview 1 data shows properly, but after that Preview2 opened and when I close it, I find Preview1=Preview2. 

so how can I handle such situation?

As per every event fired as no of instance created. but I have to check some unique document id with if condition in event itself.
is there any ways to stop unrelated event firing?

Thanks,
Bhumika

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment