Example #1
0
 @PostConstruct
 public void init() {
   model = new DefaultTagCloudModel();
   model.addTag(new DefaultTagCloudItem("Transformers", 1));
   model.addTag(new DefaultTagCloudItem("RIA", "#", 3));
   model.addTag(new DefaultTagCloudItem("AJAX", 2));
   model.addTag(new DefaultTagCloudItem("jQuery", "#", 5));
   model.addTag(new DefaultTagCloudItem("NextGen", 4));
   model.addTag(new DefaultTagCloudItem("JSF 2.0", "#", 2));
   model.addTag(new DefaultTagCloudItem("FCB", 5));
   model.addTag(new DefaultTagCloudItem("Mobile", 3));
   model.addTag(new DefaultTagCloudItem("Themes", "#", 4));
   model.addTag(new DefaultTagCloudItem("Rocks", "#", 1));
 }
Example #2
0
  @PostConstruct
  public void init() {
    model = new DefaultTagCloudModel();
    listeCourse = courseFacade.findAllPublished();
    for (Course course : listeCourse) {
      Random rd = new Random();
      int randomInt = rd.nextInt(10) + 1;

      model.addTag(
          new DefaultTagCloudItem(
              course.getCourseName(),
              "/pages/course/courseinfo.xhtml?courseid=" + course.getIdCourse(),
              randomInt));
    }
  }