01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.webwork.components.table.renderer;
06:
07: import com.opensymphony.webwork.components.table.WebTable;
08:
09: /**
10: * usefull if a column has an embeded ID number needed for a link but you want it to
11: * say something else.
12: */
13: public class FixedTextCellRenderer extends AbstractCellRenderer {
14:
15: /**
16: * this is the text that will be shown in the column
17: */
18: protected String _text = "";
19:
20: public String getCellValue(WebTable table, Object data, int row,
21: int col) {
22: return _text;
23: }
24:
25: public void setText(String text) {
26: _text = text;
27: }
28:
29: public String getText() {
30: return _text;
31: }
32: }
|