Ejemplo n.º 1
0
 // from interface Context
 public Value<Boolean> getLike(int categoryId) {
   Value<Boolean> like = _likes.get(categoryId);
   if (like == null) {
     like = Value.create(null);
     _likes.put(categoryId, like);
   }
   return like;
 }
Ejemplo n.º 2
0
  protected void gotSessionData(SessionData data) {
    _data = data;
    _coins = new Value<Integer>(data.coins);
    _gridExpires = new Value<Long>(data.gridExpires);
    _news = new Value<News>(data.news);
    _pupsmodel = new PowerupsModel(data.powerups);
    _likes = new HashMap<Integer, Value<Boolean>>();
    for (Integer like : data.likes) {
      _likes.put(like, Value.create(true));
    }
    for (Integer dislike : data.dislikes) {
      _likes.put(dislike, Value.create(false));
    }

    setContent(null);
    initFacebook(data.facebookAppId, GWT.getHostPageBaseURL() + "channel.cache.html");
    RootPanel.get(CLIENT_DIV).add(_header = new HeaderPanel(this));
    History.fireCurrentHistoryState();
  }