KickJava   Java API By Example, From Geeks To Geeks.

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


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: 8:20:18 AM
12  */

13 public abstract class DoubleListUIBean extends ListUIBean {
14     protected String JavaDoc doubleList;
15     protected String JavaDoc doubleListKey;
16     protected String JavaDoc doubleListValue;
17     protected String JavaDoc doubleName;
18     protected String JavaDoc doubleValue;
19     protected String JavaDoc formName;
20
21     public DoubleListUIBean(OgnlValueStack stack, HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) {
22         super(stack, request, response);
23     }
24
25     public void evaluateExtraParams() {
26         super.evaluateExtraParams();
27
28         Object JavaDoc 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 JavaDoc 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 JavaDoc doubleList) {
68         this.doubleList = doubleList;
69     }
70
71     public void setDoubleListKey(String JavaDoc doubleListKey) {
72         this.doubleListKey = doubleListKey;
73     }
74
75     public void setDoubleListValue(String JavaDoc doubleListValue) {
76         this.doubleListValue = doubleListValue;
77     }
78
79     public void setDoubleName(String JavaDoc doubleName) {
80         this.doubleName = doubleName;
81     }
82
83     public void setDoubleValue(String JavaDoc doubleValue) {
84         this.doubleValue = doubleValue;
85     }
86
87     public void setFormName(String JavaDoc formName) {
88         this.formName = formName;
89     }
90 }
91
Popular Tags