2011-03-25 117 views

回答

0

只需添加處理程序的打開/關閉事件,並設置複選框存在的價值:

disclosurePanel.addOpenHandler<DisclosurePanel>(new OpenHandler<DisclosurePanel>() { 

    @Override 
    public void onOpen(OpenEvent<DisclosurePanel> event) { 
    checkbox.setValue(true); 
    } 
)); 

disclosurePanel.addCloseHandler<DisclosurePanel>(new CloseHandler<DisclosurePanel>() { 

    @Override 
    public void onClose(CloseEvent<DisclosurePanel> event) { 
    checkbox.setValue(false); 
    } 
));