callback between objects

  • Follow


Hi

I have 2 classes. The CatContainer extends the HorizontalPanel. The 
CatContainer will be updated when the CatWidget receives updated data from 
database by GWT RPC.
How can I update the GUI?

Thanks

class CatContainer extends HorizontalPanel{
private CatWidget catWidget=new CatWidget(1);
//how can I implement the following to update the GUI?
catWidget.refresh( new CallBackFunc()
    {
            onSuccess()
            {
                //Update GUI
            }
    }

}

class CatWidget{
private data;

void refresh()
{
    //Call GWT async to retrieve data from database, and update the data.
}

} 

0
Reply a 11/12/2010 11:12:45 AM


0 Replies
47 Views

(page loaded in 0.019 seconds)

Similiar Articles:













7/24/2012 5:06:19 AM


Reply: