我想在一次單擊時禁用錨鏈接事件。我用anchor.setenabled(false)
但沒有任何事情發生。當我再次點擊相同的按鈕時,事件e
是true
。那時我想要false
。GWT:如何在單擊時禁用錨鏈接事件
public void onCellClick(GridPanel grid, int rowIndex, int colindex,EventObject e)
{
if(rowIndex==0 && colindex==2){
tomcatHandler = "Start";
anchorStart.setEnabled(false);
}else if(rowIndex==0 && colindex==3){
tomcatHandler = "Stop";
****anchorStop.setEnabled(false);
anchorStart.setEnabled(false);
anchorRestart.setEnabled(true);****
}else if(rowIndex==0 &&colindex==4){
tomcatHandler = "Restart";
anchorRestart.setEnabled(false);
}
AdminService.Util.getInstance().tomcat(tomcatHandler,new AsyncCallback<String>() {
@Override
public void onSuccess(String result) {
imageChangeEvent(result);
}
@Override
public void onFailure(Throwable caught) {
}
});}