我们在成功完成创建、保存、更新应用程序中的凭证后显示消息,我们使用 gwt 进行上述所有处理,并将通过使用 gwt-rpc 从服务器端获取成功消息,然后将该消息放入在 gwt 入口点中声明的面板。我们决定使用 gwt-query 来使应用程序有效,就像我们向用户显示消息后,它应该在一段时间(秒)后隐藏。
我们已经尝试过,但我们无法在 gwt 入口点中声明的面板或元素上应用 gquery。我们在html或jsp文件中申请元素。我们需要一些帮助。
代码片段
Public class myGwtEntryPoint implements EntryPoint {
VerticalPanel fiscalSettingPanel = new VerticalPanel();
AbsolutePanel messagePanel = new AbsolutePanel();
SimplePanel finishPanel = new SimplePanel();
BaseCurrency baseCurrencyGlobal;
ListBox monthListBox = new ListBox();
@Override
public void onModuleLoad() {
// Removing loading image in Jsp before loading gwt module.
if (RootPanel.get("accountingsetup-div").getElement().hasChildNodes())
RootPanel.get("accountingsetup-div").getElement().getFirstChildElement().removeFromParent();
// Here i am getting success message from server(gwt-rpc) and that to the "messagePanel", that messagePanel to the 'fiscalSettingPanel '
fiscalSettingPanel .add("messagePanel");
}
在上面的代码片段中,一旦显示消息,我想使用 gwt-query 使消息在 5 秒后消失