【发布时间】:2016-03-12 11:25:09
【问题描述】:
目前,我正在使用 java gwt,但由于出现了一个问题,我突然停止了。我希望在单击刷新按钮后保存我的信息(例如字符串)。
// user enters something in TextArea textArea1 object
Window.addWindowClosingHandler(new Window.ClosingHandler() {
public void onWindowClosing(Window.ClosingEvent closingEvent) {
//maybe there is a function or what
pleaseSaveInfomation(textArea1);
}
});
我试过这个,但我知道如何在我的源代码中正确实现它: https://stackoverflow.com/a/14220746/5010218
最后(最差)的机会是将 textArea 中的数据存储在 file.txt 中,刷新后我可以从文件中读取信息,仅此而已。但也许 GWT 有一个特定的处理程序/方法/类或处理这个的东西。
这是您的意见和帮助。
【问题讨论】: