I am still following the same example of guestbook. After the last issue was fixed, I got a few error messages, which pointed towards some parameters being not initialized. I thought I could fix it and made the following changes to gb.js.
var eventBus = new goog.events.EventTarget();
var cache;
/**
* @type {relief.cache.Cache}
* @private
*/
this.cache_ = cache = new relief.cache.Cache();
var headers = new goog.structs.Map({
'Content-Type': 'application/json'
});
var rpc;
/**
* @type {relief.rpc.RPCService}
* @private
*/
this.rpc_ = rpc = new relief.rpc.RPCService(cache, headers);
var auth;
/**
* @type {relief.auth.AuthManager}
* @private
*/
this.auth_ = auth = new relief.auth.AuthManager(eventBus);
auth.setParentEventTarget(eventBus);
var iframe = /** @type {!HTMLIFrameElement} */
(goog.dom.getElement('history_frame')),
input = /** @type {!HTMLInputElement} */
(goog.dom.getElement('history_input')),
content = /** @type {!Element} */ (goog.dom.getElement('content-root'));
var msgList = new gb.msg.MessageList();
followed by the existing code
// Replace instantiation of our old relief.handlers.CommonServiceProvider
// with our snazzy new, and shorter-named, custom provider:
var sp = new gb.ServiceProvider(msgList, gb.urls, cache, rpc, auth,
iframe, input, content);
// Then pass it to the NavManager, just like we used to.
var nav;
/**
* @type {relief.nav.NavManager}
* @private
*/
this.nav_ = nav = new relief.nav.NavManager(sp);
But this doesn't seem to be working correctly. I read the guides but I am not sure if I am getting it right.
Thanks for the help.