开发者

How to get URL of GWT EntryPoint?

I'd like to create a Hyperlink from one GWT module to another. Instead of hard-coding a URL string, I want to programmatically convert a module class to its associated URL so that when the class is refactored it does not result in broken links. Any ideas?

UPDATE: I want to be开发者_运维技巧 able to look up the URL for EntryPoint "B" from inside EntryPoint "A".


An EntryPoint doesn't have a URL, an EntryPoint's URL is any page includes the relevant nocache.js file, which can be any number of pages in your site.

So there is no programmatic way to get the one-and-only page that includes a given EntryPoint, since it can be any page that includes the script.


Use GWT#getHostPageBaseURL() or GWT#getModuleBaseURL() to construct relative paths

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜