Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ViewLoader.viewURL related query

    As per SmartClient documentation, ViewLoader.viewURL is "URL to load components from". Smartclient do not allow absolute URL like "http://www.abc.com/xyz/efg" to avoid cross-site referencing. If I give relative URL like "lmn/opq", before sending it to server it appends it to complete URL of site.

    For instance, if I access "http://www.abc.com/xyz/efg" and it serves me smartclient ViewLoader component. In this component, if I mention "lmn/opq" as relative viewURL value, the request that goes to server will be "http://www.abc.com/xyz/efg/lmn/opq", so relative URL will be appended to complete URL of page that I accessed before or visible in browser address bar.

    How can I make ViewLoader relative URL appended after the base URL of my site ("http://www.abc.com"). So I want that smartclient sends "http://www.abc.com/lmn/opq" as a request to server rather than sending "http://www.abc.com/xyz/efg/lmn/opq".

    Is there some property of ViewLoader or any other components which can make this happen.

    #2
    Have you tried
    Code:
    GWT.getModuleBaseURL()
    or
    Code:
    GWT.getHostPageBaseURL()
    to get the BaseURL?

    Comment

    Working...
    X