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 abstract class DoubleListUIBean extends ListUIBean { 14 protected String doubleList; 15 protected String doubleListKey; 16 protected String doubleListValue; 17 protected String doubleName; 18 protected String doubleValue; 19 protected String formName; 20 21 public DoubleListUIBean(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) { 22 super(stack, request, response); 23 } 24 25 public void evaluateExtraParams() { 26 super.evaluateExtraParams(); 27 28 Object doubleName = null; 29 30 if (this.doubleName != null) { 31 addParameter("doubleName", findString(this.doubleName)); 32 } 33 34 if (doubleList != null) { 35 addParameter("doubleList", doubleList); 36 } 37 38 if (doubleListKey != null) { 39 addParameter("doubleListKey", doubleListKey); 40 } 41 42 if (doubleListValue != null) { 43 addParameter("doubleListValue", doubleListValue); 44 } 45 46 if (formName != null) { 47 addParameter("formName", findString(formName)); 48 } 49 50 Class valueClazz = getValueClassType(); 51 52 if (valueClazz != null) { 53 if (doubleValue != null) { 54 addParameter("doubleNameValue", findValue(doubleValue, valueClazz)); 55 } else if (doubleName != null) { 56 addParameter("doubleNameValue", findValue(doubleName.toString(), valueClazz)); 57 } 58 } else { 59 if (doubleValue != null) { 60 addParameter("doubleNameValue", findValue(doubleValue)); 61 } else if (doubleName != null) { 62 addParameter("doubleNameValue", findValue(doubleName.toString())); 63 } 64 } 65 } 66 67 public void setDoubleList(String doubleList) { 68 this.doubleList = doubleList; 69 } 70 71 public void setDoubleListKey(String doubleListKey) { 72 this.doubleListKey = doubleListKey; 73 } 74 75 public void setDoubleListValue(String doubleListValue) { 76 this.doubleListValue = doubleListValue; 77 } 78 79 public void setDoubleName(String doubleName) { 80 this.doubleName = doubleName; 81 } 82 83 public void setDoubleValue(String doubleValue) { 84 this.doubleValue = doubleValue; 85 } 86 87 public void setFormName(String formName) { 88 this.formName = formName; 89 } 90 } 91 | Popular Tags |