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 File extends UIBean { 14 final public static String TEMPLATE = "file"; 15 16 protected String accept; 17 protected String size; 18 19 public File(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) { 20 super(stack, request, response); 21 } 22 23 protected String 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 accept) { 40 this.accept = accept; 41 } 42 43 public void setSize(String size) { 44 this.size = size; 45 } 46 } 47 | Popular Tags |