开发者

On click is not refreshing the tabledata

Hi I have been trying to reinitiate the data in a table by using an onClick handler But when I click the data the older data persists and along with that the new data is coming up

Kindly let me know how can I resolve this issue

Thanks in advance

private  void showErrorButton() {
    //super.initWidget(widget);

    _displayAlerts.addClickHandler(new ClickHandler() {
        /**
         * Click event for hiding dialog box.
         */
        public void onCli开发者_如何学Pythonck(final ClickEvent arg0) {
            getCustomDialog().getDialogBox().center();
            getCustomDialog().getDialogBox().show();
            showDialogBox(_errorList,_warnList);        
        }
    });


}


It seems like you are not clearing the old data from your table before populating it with new data.

If you're using a Panel (GWT Javadoc) (or any subclass of Panel such as HTMLTable, FlexTable, etc.) you should call the method clear() before adding the new data.

void onClick(...) {
    yourTable.clear();
    yourTable.addNewData();
}

I'll change my answer as I learn more about your specific problem if this doesn't help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜