Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Extension of a cell Item that provides access to the row and table it belongs to.

<T> Model object type
<S> The type of the sorting parameter
public class DataTableCell<T, S> extends Item<IColumn<T, S>> {
    private static final long serialVersionUID = 1L;
    private DataTable<T, S> table;
    DataTableCell(String idint indexIModel<IColumn<T, S>> modelDataTable<T, S> table) {
        this. = table;

Returns the DataTable that holds this cell.

a data table
    public DataTable<T, S> getTable() {
        return ;

Returns the row Item that holds this cell.

a row Item
    public Item<T> getRowItem() {
        // FIXME: generalize this
        return (Item<T>) this.getParent().getParent();

Returns the model of the row. Convenience accessor to ListItem#getModel() of the row Item.

the model of the row
    public IModel<T> getRowModel() {
        return getRowItem().getModel();
New to GrepCode? Check out our FAQ X