public String doFormView(
     @Pref String activityType,
     User user,
     @Pref("false") String showToolbar,
     Project project,
     FragmentContext context) {
   if (user != null) {
     user = userService.getUser(user.getId());
     Activity activity = new Activity();
     activity.setType(activityType);
     activity.setEnteredBy(user);
     activity.setProject(project);
     context.putRequestData(AttributeKeys.ACTIVITY_KEY_READABLE, activity);
     //
     context.putRequestData("showToolbar", showToolbar);
     return "vblog/activity_form";
   }
   return "commons/blank";
 }
 public String doListView(
     @Pref String[] activityTypes,
     Page<Activity> page,
     Project project,
     Site site,
     FragmentContext context) {
   page = activityService.getActivityPage(page, project, Arrays.asList(activityTypes));
   for (Activity activity : page.getResult()) {
     Long count = commentService.countComment(activity.getId(), Activity.NAME);
     activity.setCommentCount(count);
   }
   context.putRequestData(AttributeKeys.PAGE_KEY_READABLE, page);
   return "vblog/activities_list";
 }