1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.tuigwaa.plugin.database.component;
17
18 import java.io.ObjectInputStream.GetField;
19 import java.util.List;
20
21 import org.seasar.tuigwaa.database.DataRow;
22 import org.seasar.tuigwaa.database.DataTable;
23 import org.seasar.tuigwaa.view.TableFormComponent;
24
25 public class EditTableDto {
26
27 private DataTable dataTable;
28
29 private TableFormComponent tableForm;
30
31 private List actionLinks;
32
33 private int blankRowSize;
34
35 private String forwardPage;
36
37 public EditTableDto(DataTable dataTable, TableFormComponent editableForm) {
38 this.dataTable = dataTable;
39 this.tableForm = editableForm;
40 }
41
42 public DataTable getDataTable() {
43 return dataTable;
44 }
45
46 public TableFormComponent getTableForm() {
47 return tableForm;
48 }
49
50 public void setActionLinks(List actionLinks) {
51 this.actionLinks = actionLinks;
52 }
53
54 public List getActionLinks() {
55 return actionLinks;
56 }
57
58 public List toEditableHtml(int lineNumber, DataRow dataRow) {
59 Object obj = null;
60 if (dataRow != null) {
61 obj = dataRow.getDataObject();
62 }
63 return tableForm.toRowElements(lineNumber, obj, dataTable.getHeaders());
64 }
65
66 public void setBlankRowSize(int blankRowSize) {
67 this.blankRowSize = blankRowSize;
68 }
69
70 public int getBlankRowSize() {
71 return blankRowSize;
72 }
73
74 public void setForwardPage(String forwardPage) {
75 this.forwardPage = forwardPage;
76 }
77
78 public String getForwardPage() {
79 return forwardPage;
80 }
81 }