1 package com.opensymphony.webwork.components; 2 3 import com.opensymphony.xwork.util.OgnlValueStack; 4 5 import javax.servlet.http.HttpServletRequest ; 6 import javax.servlet.http.HttpServletResponse ; 7 8 13 public class Password extends TextField { 14 final public static String TEMPLATE = "password"; 15 16 protected String showPassword; 17 18 public Password(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) { 19 super(stack, request, response); 20 } 21 22 protected String getDefaultTemplate() { 23 return TEMPLATE; 24 } 25 26 public void evaluateExtraParams() { 27 super.evaluateExtraParams(); 28 29 if (showPassword != null) { 30 addParameter("showPassword", findValue(showPassword, Boolean .class)); 31 } 32 } 33 34 public void setShowPassword(String showPassword) { 35 this.showPassword = showPassword; 36 } 37 } 38 | Popular Tags |