On Fri, Mar 27, 2009 at 4:31 PM, Jordan Zimmerman <jord...@shop.com> wrote:

> >Your container code has to call setRelayUrl. Shindig can't do this
> because
> >shindig isn't your container.
>
> I understand this now. So, in my container, I need to have:
>        gadgets.rpc.setRelayUrl("..",
> "/gadgets/files/container/rpc_relay.html");


>From the wiki page:

"You must call gadgets.rpc.setAuthToken for every gadget on the page,
passing the same value for the second parameter as is included in the
"rpctoken" query string parameter in the gadget's iframe. If you don't
include the rpctoken parameter, you don't need to make this call, but
messages can be spoofed.

Additional requirements for container to gadget message passing:

You must make sure that gadgets.rpc.setRelayUrl is called for every app, so
that the container code understands where rpc_relay.html can be located."

So you need to set the relay url per gadget. If you have 5 gadgets running
on domains 0-4.example.org, and with iframe names of "ifr-[0-4]", you'd call
setRelayUrl 3 times:

gadgets.rpc.setRelayUrl("ifr-0", "
http://0.example.org/gadgets/files/container/rpc_relay.html";);

You also need to call gadgets.rpc.

You also need to make sure that the iframe's url has a parent parameter that
points to the container's rpc_relay file (must be served from the same
domain as the container page).


>
> Correct?
>
> Where do I put the gadgets.rpc.register('requestNavigateTo', ...)? In
> the container?


Yes.


>
>
> BTW - I've tried this and the handler still never gets called.
>
> Jordan Zimmerman
> Principal Software Architect
> 831.647.4712
> 831.214.2990 (cell)
> jord...@shop.com
>
> SHOP*COMTM
> Shop Smart, Save Big(tm)
> www.shop.com
>
> This message (including any attachments) is intended only for
> the use of the individual or entity to which it is addressed and
> may contain information that is non-public, proprietary,
> privileged, confidential, and exempt from disclosure under
> applicable law or may constitute as attorney work product.
> If you are not the intended recipient, you are hereby notified
> that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and
> (i) destroy this message if a facsimile or (ii) delete this
> message
> immediately if this is an electronic communication.
>
> Thank you.
>

Reply via email to