KickJava   Java API By Example, From Geeks To Geeks.

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


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: 7:10:12 AM
12  */

13 public class File extends UIBean {
14     final public static String JavaDoc TEMPLATE = "file";
15
16     protected String JavaDoc accept;
17     protected String JavaDoc size;
18
19     public File(OgnlValueStack stack, HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) {
20         super(stack, request, response);
21     }
22
23     protected String JavaDoc getDefaultTemplate() {
24         return TEMPLATE;
25     }
26
27     public void evaluateParams() {
28         super.evaluateParams();
29
30         if (accept != null) {
31             addParameter("accept", findString(accept));
32         }
33
34         if (size != null) {
35             addParameter("size", findString(size));
36         }
37     }
38
39     public void setAccept(String JavaDoc accept) {
40         this.accept = accept;
41     }
42
43     public void setSize(String JavaDoc size) {
44         this.size = size;
45     }
46 }
47
Popular Tags