1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.extremecomponents.table.model;
17
18 import java.util.List;
19
20 import org.apache.commons.beanutils.MethodUtils;
21 import org.apache.commons.logging.Log;
22 import org.apache.commons.logging.LogFactory;
23 import org.extremecomponents.table.bean.Column;
24 import org.extremecomponents.table.cell.Cell;
25 import org.extremecomponents.util.ExceptionUtils;
26
27
28 /***
29 * @author jeff johnston
30 */
31 public class ProcessDefaultColumn implements ProcessColumn
32 {
33 private static Log logger = LogFactory.getLog(ProcessDefaultColumn.class);
34
35 public void beforeFirstRow(TableModel model, String method, List body){}
36 public void afterLastRow(TableModel model, String method, List body){}
37
38 public String process(TableModel model, Column column, Cell cell, String method)
39 {
40 try
41 {
42 return (String)MethodUtils.invokeMethod(cell, method, null);
43 }
44 catch (Exception e)
45 {
46 System.out.println(ExceptionUtils.formatStackTrace(e));
47 logger.debug("Could not invoke the cell method.", e);
48 }
49
50 return null;
51 }
52 }