new AbstractReadOnlyModel<List<TwitterStatus>>() {
private static final long serialVersionUID = 1L;
@Override
public List<TwitterStatus> getObject() {
DashboardRepository repository = WicketApplication
.get().getRepository();
return repository.getData(TwitterTimeline.class)
.get(key).getValue();
}
});
add(timelineDataResource);
this.mentionsDataResource = new JsonResourceBehavior<List<TwitterStatus>>(
new AbstractReadOnlyModel<List<TwitterStatus>>() {
private static final long serialVersionUID = 1L;
@Override
public List<TwitterStatus> getObject() {
DashboardRepository repository = WicketApplication
.get().getRepository();
return repository.getData(TwitterMentions.class)
.get(key).getValue();
}
});
add(mentionsDataResource);
}