View Javadoc

1   package net.sf.imca.taglibs;
2   
3   import javax.servlet.jsp.JspException;
4   
5   import net.sf.imca.model.AssociationBO;
6   import net.sf.imca.services.CommitteeService;
7   
8   public class Association extends javax.servlet.jsp.tagext.TagSupport {
9   
10      /**
11       * Generated serialVersionUID
12       */
13      private static final long serialVersionUID = 8944804977828774091L;
14  
15      private String countryCode = "";
16      private String  area = "";
17      
18  
19      public int doStartTag() throws JspException {
20  
21          String parameterCountryCode = this.pageContext.getRequest()
22                  .getParameter("countrycode");
23          if (parameterCountryCode != null) {
24              countryCode = parameterCountryCode;
25          }
26  
27          String parameterArea = this.pageContext.getRequest().getParameter(
28                  "area");
29          if (parameterArea != null) {
30              area = parameterArea;
31          }
32  
33          CommitteeService service = new CommitteeService();
34          AssociationBO association = service.getAssociation(countryCode, area);
35  
36          pageContext.setAttribute("name", association.getName());
37          return EVAL_BODY_INCLUDE;
38  
39      }
40  
41      public String getCountryCode() {
42          return countryCode;
43      }
44  
45      public void setCountryCode(String countryCode) {
46          this.countryCode = countryCode;
47      }
48  
49      public String getArea() {
50          return area;
51      }
52  
53      public void setArea(String area) {
54          this.area = area;
55      }
56  }