1 16 17 package org.springframework.web.servlet.tags.form; 18 19 import javax.servlet.jsp.JspException ; 20 21 29 public class PasswordInputTag extends InputTag { 30 31 private boolean showPassword = false; 32 33 34 38 public boolean isShowPassword() { 39 return this.showPassword; 40 } 41 42 46 public void setShowPassword(boolean showPassword) { 47 this.showPassword = showPassword; 48 } 49 50 54 protected String getType() { 55 return "password"; 56 } 57 58 63 protected void writeValue(TagWriter tagWriter) throws JspException { 64 if (this.showPassword) { 65 super.writeValue(tagWriter); 66 } else { 67 tagWriter.writeAttribute("value", ""); 68 } 69 } 70 } 71 | Popular Tags |