public class CheckboxTableCell extends TableCell
Here is an example of using the simpleTable tag libary in a JSP:
<iman:dataTable titleKey="RBS.AvailableModules" titleBundle="FwResources" menuItems="${menuItems}"
columnHeaders="${columnHeaders}" tableData="${tableData}" menuActionHandler="contentEventHandler"
linkActionHandler="contentLinkActionHandler" />
For the tableData variable of the simpleTable tag Library (ex. tableData="${tableData}"), you would pass an
TableCell[][] double array. The TableCell[][] array can contain TextTableCell, IconTableCell, LinkTableCell,
and CheckboxTableCell objects.
For example, here is how you could create the TableCell[][] double array:
List theList = (List)request.getAttribute("availableModules"); // Data for the table
TableCell[][] tableData = new TableCell[theList.size()][];
int index = 0;
for(Iterator iterator = theList.iterator(); iterator.hasNext(); index++)
{
// ModuleData is the data being displayed in this table
ModuleData element = (ModuleData)iterator.next();
tableData[index] = new TableCell[4];
String iconUrl = "dev/dir/rbsModule2.gif";
tableData[index][0] = new IconTableCell(c.string("RBS.Module"), iconUrl, "module");
tableData[index][1] = new TextTableCell(element.getModuleDisplayName(), element.getModuleFDN());
tableData[index][2] = new LinkTableCell(element.getModulePackageName(), element.getModulePackageName());
tableData[index][3] = new CheckboxTableCell("true");
}
request.setAttribute("tableData", tableData);
This example would show four columns of data: the first an icon, the second text displaying the name of the module,
the third a URL with a link to the module, and fourth a checkbox that is checked.
| Constructor and Description |
|---|
CheckboxTableCell(java.lang.String value)
Constructs a CheckboxTableCell that will show a checkbox.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getPostedValue(java.lang.String tableId,
int column,
int row,
javax.servlet.http.HttpServletRequest request)
Returns whether the CheckboxTableCell is checked.
|
void |
render(java.io.PrintWriter out,
TableCellContext context)
Render HTML for cell containing the checkbox.
|
public CheckboxTableCell(java.lang.String value)
value - String containing the actual value of the checkboxpublic void render(java.io.PrintWriter out,
TableCellContext context)
public static boolean getPostedValue(java.lang.String tableId,
int column,
int row,
javax.servlet.http.HttpServletRequest request)
tableId - int containing the unique ID of the simpleTablecolumn - int containing the column number of the CheckboxTableCellrow - int containing the row number of the CheckboxTableCellrequest - HttpServletRequest object to get parameters from the request
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.