Laura:
Turns out with recent changes to rpc.js (if yours has symbols in it named
gadgets.rpctx.*, you've got the new one), you won't need an "actual"
rpc_relay.html file any more. Which browser are you using?

For each gadget you render in your container with IFRAME ID "<gadget-id>"
with URL "<render-url>" you'll need to do:

gadgets.rpc.setRelayUrl("<gadget-id>", "<render-url>");
gadgets.rpc.setAuthToken("<gadget-id>", null);

If you choose to add an rpc token to the gadget (via
<render-url>#rpctoken=<random-number> - this prevents gadgets from spoofing
each other's messages to/from the container as a security measure), change
the last line to:
gadgets.rpc.setAuthToken("<gadget-id>", "<random-number>");

--John

On Tue, Aug 4, 2009 at 2:39 PM, Chris Chabot <[email protected]> wrote:

> Hey Laura,
>
> Chances are that it can't find the rpc_relay.html file, see this bit in
> shindig/config/container.js:
>
>  "rpc" : {
>    // Path to the relay file. Automatically appended to the parent
>    /// parameter if it passes input validation and is not null.
>    // This should never be on the same host in a production environment!
>    // Only use this for TESTING!
>    "parentRelayUrl" : "/gadgets/files/container/rpc_relay.html",
>
>   -- Chris
>
> On Tue, Aug 4, 2009 at 4:43 PM, Laura Nathanson
> <[email protected]>wrote:
>
> > Hello there,
> >
> > I'm trying to get setTitle working in my container, and having no
> > luck.
> >
> > In container.js I've registered and defined the setTitle function to
> > just thow up an alert message. I'm including container.js and a
> > reference to my shindig's rpc.js file in the container's gadget
> > hosting page. But when my gadget calls gadgets.window.setTitle, no alert
> > pops up.
> >
> > What else might I be missing? Are there some other files that my
> > container needs to have? Some setting in Shindig that I need to
> > change or some other functions I need to write?
> >
> > My iframe urls do have a parent param set. I saw an old wiki article
> > that said: "You must make sure that gadgets.rpc.setRelayUrl is called
> > for every app". But, I couldn't find this method call anywhere in
> > Partuza, so is this still true?
> >
> > (using PHP Shindig btw)
> >
> > Laura
> >
>

Reply via email to