best way to externalize HTML in GWT apps?

前端 未结 14 1203
执念已碎
执念已碎 2020-12-08 03:33

What\'s the best way to externalize large quantities of HTML in a GWT app? We have a rather complicated GWT app of about 30 \"pages\"; each page has a sort

14条回答
  •  醉酒成梦
    2020-12-08 04:20

    I'd say you load the external html through a Frame.

    Frame frame = new Frame();
    frame.setUrl(GWT.getModuleBase() + getCurrentPageHelp());
    add(frame);
    

    You can arrange some convention or lookup for the getCurrentPageHelp() to return the appropriate path (eg: /manuals/myPage/help.html)

    Here's an example of frame in action.

提交回复
热议问题