1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.extremecomponents.table.bean;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.extremecomponents.table.FormAttributes;
20 import org.extremecomponents.table.model.TableModel;
21 import org.extremecomponents.table.model.TableProperties;
22
23
24 /***
25 * @author jeff johnston
26 */
27 public class Form implements FormAttributes
28 {
29 private TableModel model;
30
31 private String name;
32 private String action;
33 private String method;
34 private String onsubmit;
35
36 public Form(TableModel model)
37 {
38 this.model = model;
39 }
40
41 public String getName()
42 {
43 return name;
44 }
45
46 public void setName(String name)
47 {
48 this.name = name;
49 }
50
51 public String getAction()
52 {
53 return action;
54 }
55
56 public void setAction(String action)
57 {
58 this.action = action;
59 }
60
61 public String getMethod()
62 {
63 if (StringUtils.isBlank(method))
64 {
65 method = model.getProperties().getProperty(TableProperties.METHOD);
66 }
67
68 return method;
69 }
70
71 public void setMethod(String method)
72 {
73 this.method = method;
74 }
75
76 public String getOnsubmit()
77 {
78 return onsubmit;
79 }
80
81 public void setOnsubmit(String onsubmit)
82 {
83 this.onsubmit = onsubmit;
84 }
85 }