Unfortunately that won't work, the portlets aren't in their own frames but
they're loaded twice.  And the problem with using module name to distinguish
them is that they both have the same module name but different
resourceUrls.  The only solution that I think may work is having velocity
replace a local JS variable in the nocache.js.
Thanks

On Thu, Feb 3, 2011 at 11:13 PM, Colin Alworth <niloc...@gmail.com> wrote:

> In your *.nocache.js content, you say you will have 'this.resourceUrl =
> "content-replaced-by-velocity";' – what is 'this' in this context? If it is
> the shared window that all the portlets use, they will each overwrite the
> resourceUrl property. If each portlet will use a different module, you could
> use modulename to set and access this data. This could look something like
> window.MyModuleName.resourceUrl = "$resourceUrl"
> and then access it in your native method with
> return
> $wnd[@com.google.gwt.core.client.GWT::getModuleName()()].resourceUrl;
>
>
> If I have misunderstood and each portlet is in its own iframe, then your
> native call just needs to say 'return $wnd.resourceUrl;' to correctly
> reference the window object that the resourceUrl was set in.
>
> Hope this helps,
> Colin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to