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 Checkbox extends UIBean { 14 final public static String TEMPLATE = "checkbox"; 15 16 protected String fieldValue; 17 18 public Checkbox(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) { 19 super(stack, request, response); 20 } 21 22 protected String getDefaultTemplate() { 23 return TEMPLATE; 24 } 25 26 protected void evaluateExtraParams() { 27 if (fieldValue != null) { 28 addParameter("fieldValue", findString(fieldValue)); 29 } 30 } 31 32 protected Class getValueClassType() { 33 return Boolean .class; } 35 36 public void setFieldValue(String fieldValue) { 37 this.fieldValue = fieldValue; 38 } 39 } 40 | Popular Tags |