我有下面的小部件
textbox, anchor_delete
当按下anchor_delete时,@ onhandler被解雇,我希望整个小部件文本框和anchor_delete从视图中删除自己。这可能吗
@UiHandler("anchor_delete")
void deleteRowAction(ClickEvent event) {
getWidget().removeFromParent(); //i tried this but fail
}
答案 0 :(得分:0)
你有没有尝试过:
textbox.removeFromParent();
anchor_delete.removeFromParent();
假设两者都是小部件。