KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > components > Password


1 package com.opensymphony.webwork.components;
2
3 import com.opensymphony.xwork.util.OgnlValueStack;
4
5 import javax.servlet.http.HttpServletRequest JavaDoc;
6 import javax.servlet.http.HttpServletResponse JavaDoc;
7
8 /**
9  * User: plightbo
10  * Date: Jul 20, 2005
11  * Time: 7:06:06 AM
12  */

13 public class Password extends TextField {
14     final public static String JavaDoc TEMPLATE = "password";
15
16     protected String JavaDoc showPassword;
17
18     public Password(OgnlValueStack stack, HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) {
19         super(stack, request, response);
20     }
21
22     protected String JavaDoc getDefaultTemplate() {
23         return TEMPLATE;
24     }
25
26     public void evaluateExtraParams() {
27         super.evaluateExtraParams();
28
29         if (showPassword != null) {
30             addParameter("showPassword", findValue(showPassword, Boolean JavaDoc.class));
31         }
32     }
33
34     public void setShowPassword(String JavaDoc showPassword) {
35         this.showPassword = showPassword;
36     }
37 }
38
Popular Tags