I was also having an issue w/ pubsub-2 after drag/dropping a gadget.  The
exception I get is:

Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED)
nsIDOMJSWindow.setTimeout"

Not sure if we're hitting the same issue, but this is how I worked around
the issue:

In rpc.js, try commenting out the "if" clause and matching brace (lines 482
and 501) in function callSameDomain(target, rpc).

The "if" clause is an optimization to avoid redefining sameDomain[target]
(line 495) if the value is already defined.  But the problem is that after
you drag and drop, the target element value targetEl (line 492) has changed,
which also means the value of sameDomain[target] has changed (line 495).
 But since sameDomain[target] is already defined, the code doesn't update
the value of sameDomain[target], but instead jumps to calling the rpc (line
505).

I haven't yet created a Shindig ticket for this because I'm not sure if my
workaround is an appropriate fix.

Thoughts anyone?

Dennis


On Wed, Jan 19, 2011 at 4:54 PM, Maxwell <mchiar...@gmail.com> wrote:

> Did you get any trouble with pubsub and pubsub2 after drag and reload the
> gadgets?
>
> I just saw that, after i drag/drop and the iframe is reloaded the pubsub
> stop working.
>
> Thanks.
>
> On Sat, Jan 8, 2011 at 11:02 PM, Robson Dantas <biu.dan...@gmail.com>
> wrote:
>
> > Opensocial jquery will not help that much.
> >
> > Opensocial dashboard uses google friend connect to render gadgets. I used
> a
> > lot this project and works really well.
> >
> > There are some jquey libs to implement drag and drop but you will need to
> > hack around setting src. Posted a question related some time ago. If you
> > need anything let me know.
> >
> > Robson Dantas
> >
> >
> >
> > Sent from my iPhone
> >
> > Em 08/01/2011, às 19:56, Jonathan Beri <jonathan.b...@magento.com>
> > escreveu:
> >
> > > Not sure if this will help, but there is a jQuery/OpenSocial project:
> > > http://code.google.com/p/opensocial-jquery/ & a dashboard project:
> > > http://code.google.com/p/opensocial-dashboard/
> > >
> > > *--------------------------------------------*
> > > *
> > > *
> > > *Jonathan Beri*
> > > Senior Technical Product Manager, Magento Inc.
> > >
> > > On Fri, Jan 7, 2011 at 2:31 PM, Maxwell <mchiar...@gmail.com> wrote:
> > >
> > >> Thats weird i can not get the drag/drop working without set the src
> > field.
> > >>
> > >> But i'm just changed to shindig-3 and common container, and i do no
> have
> > >> this problem anymore.
> > >>
> > >> Thanks
> > >>
> > >> On Thu, Jan 6, 2011 at 5:15 PM, Ciancetta, Jesse E. <jc...@mitre.org>
> > >> wrote:
> > >>
> > >>> I think the reason the iframe src gets set to about:blank is to work
> > >> around
> > >>> an issue with the bfcache (back-forward cache) in some browsers --
> have
> > a
> > >>> look at the comments for this JIRA issue for a detailed discussion:
> > >>>
> > >>> https://issues.apache.org/jira/browse/SHINDIG-158
> > >>>
> > >>> The iframe disappearing issue seems odd though.  In our container we
> > also
> > >>> use jquery sortable for drag and drop and use the about:blank
> technique
> > >> to
> > >>> work around the bfcache issue -- and we haven't seen the issue you're
> > >>> describing in any browser.  One thing I have observed though which
> > might
> > >> be
> > >>> relevant is that on drop (at least in firefox) it insists on
> reloading
> > >> the
> > >>> *first* url that was set after about:blank.  So for example -- if we
> > were
> > >> to
> > >>> render the iframe initially with "about:blank", then set the src of
> > that
> > >>> iframe to our gadget rendering url, then subsequently set the src to
> > >>> google.com and then drag and drop -- on drop it would reload the
> > gadget
> > >>> rendering url and not google.com.
> > >>>
> > >>> One other thing to be aware of -- if you have any JavaScript inside
> > >> script
> > >>> tags nested somewhere within the hierarchy of the element that gets
> > >>> detached/reattached to the DOM during the drag and drop, in some
> > browsers
> > >>> that script will get re-executed on drop.
> > >>>
> > >>> --Jesse
> > >>>
> > >>> -----Original Message-----
> > >>> From: Xandeco, Maxwell [mailto:maxwell.xand...@gft.com]
> > >>> Sent: Thursday, January 06, 2011 11:57 AM
> > >>> To: dev@shindig.apache.org
> > >>> Subject: RES: Writing an interface with drag/drop support.
> > >>>
> > >>> Reload the iframe it's the natural behavior of firefox and google
> > chrome,
> > >>> it's not a problem, the problem is when shinding render the iframe,
> > does
> > >> not
> > >>> include the gadget url in the iframe, like:
> > >>>
> > >>> <iframe src="about:blank"/>
> > >>>
> > >>> That's what shindig does by default, you can see on
> > >>> shindig.IfrGadget.getMainContent, it's setting the src to
> about:blank,
> > I
> > >>> just did override this method and changed to src=
> this.getIframeUrl().
> > >>>
> > >>> Worked for me, I just did not understand why shindig set to blank.
> > >>>
> > >>> Thanks
> > >>>
> > >>> ________________________________________
> > >>> De: Pablo Graña [pablo.gr...@globant.com]
> > >>> Enviado: quinta-feira, 6 de janeiro de 2011 14:04
> > >>> Para: dev@shindig.apache.org
> > >>> Assunto: Re: Writing an interface with drag/drop support.
> > >>>
> > >>> Your problem is that the gadget renders itself again after you drop
> > >>> it? As far as I known this also happens in igoogle, when the gadget
> > >>> renders in an iframe (some igoogle gadgets render inline).
> > >>>
> > >>> I think that this happens because when you drag a gadget, jquery
> > >>> detaches it from its parent div, and when you drop it, it re-attaches
> > >>> the gadget to another div. This makes the iframe base element to
> > >>> change its value and forces the iframe to refresh its content. The
> > >>> weird thing about it is that this does not happen in ie.
> > >>>
> > >>> I could not find a way to avoid this behaviour, so I am now living
> with
> > >> it.
> > >>>
> > >>> regards
> > >>>
> > >>> On Thu, Jan 6, 2011 at 11:15 AM, Xandeco, Maxwell
> > >>> <maxwell.xand...@gft.com> wrote:
> > >>>> Hi guys, i'm trying to create a "igoogle like" interface, I just
> added
> > >>> drag and drop support using jquery sortable feature it's working
> pretty
> > >>> well, but after drop the gadget in the new area, the iframe disapper
> in
> > >>> firegox, because firefox try reload the iframe after the drop.
> > >>>>
> > >>>>
> > >>>>
> > >>>> After a short debug using firebug and igoogle , i realized that the
> > >>> problem is, when my server (shindig without mods) render the gadget
> it
> > >> set
> > >>> the src attribute in the iframe as "about:blank" and google use the
> ifr
> > >>> link, like
> > >>>
> > >>
> >
> http://www.ig.gmodules.com/gadgets/ifr?exp_rpc_js=1&exp_track_js=1&url=http%3A%2F%
> > >>> <
> > >>>
> > >>
> >
> http://www.ig.gmodules.com/gadgets/ifr?exp_rpc_js=1&exp_track_js=1&url=http%3A%2F%2Fhosting.gmodules.com%2Fig%2Fgadgets%2Ffile%2F100816590802129143348%2FhelloNishant.xml&container=ig&view=default&lang=pt-br&country=BR&v=ebfb342224565688&parent=http://www.google.com.br&libs=core:core.io:core.iglegacy:auth-refresh&is_signedin=1&synd=ig&view=default#st=c%3Dig%26e%3DAPu7icqTjfqUxN02J/K9K%252BZLn2Eqx%252BsWQqxzagry5fVZSLusOcel23C5G8xMAL8MZNVoqnK56SrkMsj5bAep5TV%252BtYTN7xCO0/apbdnvzTfvkmvSnFbClTLt4X5qJ1%252Be72QQLgq/JbYz&gadgetId=112755416542104557542&gadgetOwner=111346446497480925725&gadgetViewer=111346446497480925725&rpctoken=1634651312&ifpctok=1634651312
> > >>>
> > >>> [MORE_HERE].
> > >>>>
> > >>>>
> > >>>>
> > >>>> So why shindig it's not including the ifr url for my gadget in the
> > >>> rendering process automatically, should I do that manually, in
> > javascript
> > >>> container or java servlets?
> > >>>>
> > >>>>
> > >>>>
> > >>>> Thanks
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> Pablo Gra\~na
> > >>> Chief Architect
> > >>> Globant
> > >>> Arg Office: +54 (11) 4109 1743
> > >>> UK  Office: +44 (20) 7043 8269 int 8043
> > >>> US  Office: +1 (212) 400 7686 int 8043
> > >>>
> > >>
> >
>

Reply via email to