我如何从 RequestFactoryEditorDriver 获取编辑后的代理
使用编辑器进行更改后,我不知道如何更新我的单元格表。如果我可以获得编辑后的代理,那么我可以使用数据提供程序来更新我的单元格表。
public void saveCampaign() {
driver.flush();
// the problem. proxy at this point should have the new values?....
context.persist().using(proxy).fire(new Receiver<Void>() {
@Override
public void onSuccess(Void response) {
showListView();
}
});
}
.using(proxy) 中的代理不包含在编辑器上所做的更改。但是,服务器上的 persist 方法会获取更新的值。如果我从服务器重新加载数据,我会在单元格表中获得正确的值。
public void editCampaign(CampaignProxy proxy) {
this.proxy = proxy;
if (proxy != null) {
context = AEHOME.requestFactory.campaignRequest();
showEditView();
}
}
private void showEditView() {
driver.initialize(eventBus, AEHOME.requestFactory, editView);
driver.edit(proxy, context);
deckPanel.showWidget(deckPanel.getWidgetIndex(editView));
}
在列表视图中设置代理:configurationPageView.proxy = SelectionModel.getSelectedObject();
任何建议将不胜感激。谢谢。
I can't figure out how to update my celltable after changes have been made using an editor. If I could get the edited proxy then I can use the dataprovider to update my celltable.
public void saveCampaign() {
driver.flush();
// the problem. proxy at this point should have the new values?....
context.persist().using(proxy).fire(new Receiver<Void>() {
@Override
public void onSuccess(Void response) {
showListView();
}
});
}
The proxy in .using(proxy) does not contain the changes made on the editor. However the persist method on the server gets the updated values. If I reload the data from the server I get the correct values to the celltable.
public void editCampaign(CampaignProxy proxy) {
this.proxy = proxy;
if (proxy != null) {
context = AEHOME.requestFactory.campaignRequest();
showEditView();
}
}
private void showEditView() {
driver.initialize(eventBus, AEHOME.requestFactory, editView);
driver.edit(proxy, context);
deckPanel.showWidget(deckPanel.getWidgetIndex(editView));
}
Proxy is set in the list view: configurationPageView.proxy = selectionModel.getSelectedObject();
Any advice would be greatly appreciated. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过执行以下操作来更改请求的构建方式:
在 GWT 2.4 中,可以保留当前的代码组织并使用
RequestContext.append()
:You can change how the request is built by doing the following:
In GWT 2.4 it will be possible to keep your current code organization and use
RequestContext.append()
: