KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > pets > presentation > components > Banner


1 package org.apache.tapestry.pets.presentation.components;
2
3 import org.apache.tapestry.BaseComponent;
4 import org.apache.tapestry.pets.Visit;
5
6
7 public class Banner extends BaseComponent
8 {
9     private String JavaDoc favoriteCategory;
10
11     public String JavaDoc getBannerPath()
12     {
13         Visit visit = (Visit) getPage().getEngine().getVisit();
14
15         if (visit.getBannerpath() == null)
16         {
17             //visit.setBannerpath(Account.getBannerPath(getFavoriteCategory()));
18
}
19
20         return visit.getBannerpath();
21     }
22
23     public String JavaDoc getFavoriteCategory()
24     {
25         return favoriteCategory;
26     }
27
28     public void setFavoriteCategory(String JavaDoc favoriteCategory)
29     {
30         this.favoriteCategory = favoriteCategory;
31     }
32 }
33
Popular Tags