1
2
3
4
5
6
7
8 package org.asyrinx.joey.tapestry.components.stative;
9
10 import java.util.ArrayList;
11 import java.util.List;
12
13 import org.apache.tapestry.IRequestCycle;
14 import org.apache.tapestry.form.IPropertySelectionModel;
15 import org.apache.tapestry.form.StringPropertySelectionModel;
16 import org.asyrinx.joey.om.SearchCondition;
17
18 /***
19 * @author akima
20 */
21 public abstract class BaseListPage extends EditablePage {
22
23 /***
24 *
25 */
26 public BaseListPage() {
27 super();
28 }
29
30 public static IPropertySelectionModel MAX_RECORD_COUNT_OPTIONS =
31 new StringPropertySelectionModel(
32 new String[] { "10", "20", "30", "50", "100", });
33
34 private String maxRecordCount = "10";
35
36 /***
37 * @return
38 */
39 public String getMaxRecordCount() {
40 return maxRecordCount;
41 }
42
43 /***
44 * @param integer
45 */
46 public void setMaxRecordCount(String integer) {
47 maxRecordCount = integer;
48 }
49
50 private List objects = new ArrayList();
51
52 /***
53 * @return
54 */
55 public List getObjects() {
56 return objects;
57 }
58
59 abstract public SearchCondition getWayToSearch();
60 abstract public void setWayToSearch(SearchCondition condition);
61
62 abstract public void selectObj(IRequestCycle cycle);
63 abstract public void createObj(IRequestCycle cycle);
64 abstract public void deleteObj(IRequestCycle cycle);
65
66 abstract public void search(IRequestCycle cycle);
67 }