Ah I see what your saying Bastian. Let me take a look at that. Thanks. -Ryan
Email: [email protected] Phone: 978-899-3041 developerWorks Profile From: Bastian Hofmann <[email protected]> To: [email protected], Date: 02/14/2011 03:27 AM Subject: Re: Manipulating Data Context From A Container No, if you add something like the following on the gadget side: gadgets.rpc.register('put_data_set', function(dataSets) { opensocial.data.DataContext.putDataSets(dataSets); }); you can call the rpc method put_data_set from your container: gadgets.rpc.call('gadget_iframe_id', 'put_data_set', null, {key: value}); And the registered method will be called on the gadget side automatically. Hope this helps Bastian 2011/2/11 Ryan J Baxter <[email protected]> > Brian wouldn't this still require the gadget to call putDataSet? I don't > want the gadget to have to do anything, instead I would like to put > something in the data context for a gadget from the container. That way > the gadget can just use it. > > -Ryan > > Email: [email protected] > Phone: 978-899-3041 > developerWorks Profile > > > > From: Bastian Hofmann <[email protected]> > To: [email protected], > Date: 02/10/2011 05:01 PM > Subject: Re: Manipulating Data Context From A Container > > > > You probably will have to register the > opensocial.data.DataContext.putDataSet method as an rpc method on the > gadget > side and then use rpc to push the data from the container (similar to the > current implementation of a security token update (auth-refresh)). > > Cheers > > Bastian > > 2011/2/10 Ryan J Baxter <[email protected]> > > > I would like to be able to set something in a gadgets data context > object > > from the container. The feature only provides the javascript API to the > > gadget, which makes sense. It looks as though things are inserted into > > the data context object by injecting the javascript to do so when the > > gadget is rendered. Looks like PipelineDataGadgetRewriter.java does > this. > > Does anyone know is its possible to manipulate a gadget's data context > > object from the container? At the moment it does not look like it is. > > > > -Ryan > > > > Email: [email protected] > > Phone: 978-899-3041 > > developerWorks Profile > > > > > > > >
