KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > application > web > talk > jspbeans > ChatIfEmailTag


1 /*
2  * ChatScriptTag.java
3  *
4  * Created on April 4, 2004, 8:42 AM
5  */

6
7 package com.quikj.application.web.talk.jspbeans;
8
9 import javax.servlet.http.*;
10
11 import com.quikj.server.framework.*;
12
13 /**
14  *
15  * @author amit
16  */

17 public class ChatIfEmailTag extends javax.servlet.jsp.tagext.TagSupport JavaDoc
18 {
19     
20     /** Creates a new instance of ChatScriptTag */
21     public ChatIfEmailTag()
22     {
23     }
24     
25     public int doStartTag()
26     {
27         boolean oos_email = false;
28         HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
29         ContactCenterCustomerProperty property = (ContactCenterCustomerProperty)request.getAttribute("customerProperty");
30         if (property != null)
31         {
32             if (property.getOosEmail() != null)
33             {
34                 oos_email = true;
35             }
36         }
37         
38         if ((AceMailService.getInstance() != null) && (oos_email == true))
39         {
40             return EVAL_BODY_INCLUDE;
41         }
42         else
43         {
44             return SKIP_BODY;
45         }
46     }
47     
48     public int doEndTag()
49     {
50         return EVAL_PAGE;
51     }
52     
53 }
54
Popular Tags