The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CallBackery::GuiPlugin::AbstractTable - Base Class for a table plugin

SYNOPSIS

 use Mojo::Base 'CallBackery::GuiPlugin::AbstractTable';

DESCRIPTION

The base class for reporter reporters.

ATTRIBUTES

The attributes of the CallBackery::GuiPlugin::AbstractForm class and these:

tableCfg

a table configuration

 return [
    {
        label => trm('Id'),
        type => 'number',
        flex => 1,
        key => 'id',
        sortable => $self->true,
    },
    {
        label => trm('Date'),
        type => 'str',
        flex => 2
        key => 'date'
    },
    {
        label => trm('Content'),
        type => 'str',
        flex => 8,
        key => 'date'
    },
 ]

METHODS

All the methods of CallBackery::GuiPlugin::AbstractForm plus:

getData ('tableData|tableRowCount',tableDataRequest);

Return the requested table data and pass other types of request on to the upper levels.

getTableData({formData=>{},firstRow=>{},lastRow=>{},sortColumn=>'key',sortDesc=>true)

return data appropriate for the remote table widget

getTableRowCount({formData=>{}})

return the number of rows matching the given formData

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

COPYRIGHT

Copyright (c) 2013 by OETIKER+PARTNER AG. All rights reserved.

AUTHOR

Tobias Oetiker <tobi@oetiker.ch>

HISTORY

 2013-12-16 to 1.0 first version