Any idea about this behavior?
Here is the source code for using wave states in the gadget:
function stateUpdated(){
wave.log("stateUpdated...");
var eventList = wave.getState().get('eventList');
if (eventList){
var mydata = eval('(' + eventList + ')');
jQuery("#calendar").clearGridData();
for(var i=0;i<=mydata.rows.length;i++)
jQuery("#calendar").addRowData(i+1,mydata.rows[i]);
}
}
function saveState(key, value) {
var state = wave.getState();
var delta = {};
delta[key] = value;
state.submitDelta(delta);
}
function init() {
if (wave && wave.isInWaveContainer()) {
wave.setStateCallback(stateUpdated);
}
...................................................................
jQuery("#btnNew","#t_calendar").click(function(){
jQuery("#calendar").editGridRow('new',{
reloadAfterSubmit:false,
closeAfterEdit:true,
closeAfterAdd:true,
afterComplete : function() {
var idList =
jQuery("#calendar").getDataIDs();
var jsonObj = {'rows': [] };
for(var i = 0; i < idList.length; i++)
{
jsonObj.rows.push(jQuery("#calendar").getRowData(idList[i]));
}
var jsonString = JSON.stringify(jsonObj);
saveState
('eventList',jsonString);
wave.log("Send update...");
}
});
});
.......................................................
gadgets.util.registerOnLoadHandler(init);
2009/11/23 Matias Molinas <[email protected]>:
> thanks for the playback on wave! I'm not crazy!
>
> sometimes works:
>
> https://wave.google.com/wave/?ll=debug#minimized:nav,minimized:contact,minimized:search,restored:wave:googlewave.com!w%252BTFB024BjA
>
> sometimes not:
>
> https://wave.google.com/a/wavesandbox.com/?ll=debug#minimized:nav,minimized:contact,minimized:search,restored:wave:wavesandbox.com!w%252BSqL5UzhAJ
>
> 2009/11/23 Matias Molinas <[email protected]>:
>> As you can see using playback in:
>>
>> https://wave.google.com/wave/?ll=debug#minimized:nav,minimized:contact,minimized:search,restored:wave:googlewave.com!w%252BBqazgSXrA.3
>>
>> some times the wave states is alive and works
>>
>> 2009/11/23 matias molinas <[email protected]>:
>>> Hi, sorry, is public now :-)
>>>
>>> https://wave.google.com/wave/#minimized:nav,minimized:contact,minimized:search,restored:wave:googlewave.com!w%252B29Kw7WeBA.2
>>>
>>>
>>>
>>> On 23 nov, 11:34, "pamela (Google Employee)" <[email protected]>
>>> wrote:
>>>> Hi Matias -
>>>>
>>>> Please make that Wave public if you would like others to be able to see it.
>>>>
>>>> - pamela
>>>>
>>>> On Mon, Nov 23, 2009 at 8:46 AM, Matias Molinas
>>>> <[email protected]>wrote:
>>>>
>>>> > He,
>>>> > yesterday my gadget for todolist work fine with with wave states, this
>>>> > day is not working.
>>>>
>>>> > Could be due to a server problem?
>>>>
>>>> > The wave where it worked yesterday and today you I can not retrieve
>>>> > the gadget state is:
>>>>
>>>> >https://wave.google.com/wave/#restored:wave:googlewave.com!w%252B29Kw...
>>>
>>> --
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "Google Wave API" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-wave-api?hl=.
>>>
>>>
>>>
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google Wave API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-wave-api?hl=en.