
ePortal::HTML::List - List of objects support.

This module is used to make a list of objects. Example:
<% $list->draw_list %>
<%method folder_name><%perl>
my $list = $ARGS{list};
my $obj = $list->{obj};
. . .
</%perl>
<% HTML output %>
</%method>
<%method onStartRequest><%perl>
my $obj = new ePortal::Notepad::View01;
$list = new ePortal::HTML::List( obj => $obj, class=>"smallfont" );
$list->add_column_image();
$list->add_column( id => "title", title => "Column title",
width => "60%", url => "url.htm?objid=#id#");
$list->add_column_method( id => "folder_name", title => "Folder name");
$list->add_column_system( delete => 1);
my $location = $list->handle_request;
return $location if $location;
$obj->restore_where($list->restore_parameters);
</%perl></%method>

Object contructor. Takes the same arguments as initialize()
Object initializer. See Attributes for details.
Handle request and do redirect if needed. Return new location.
Returns array of ListColumn objects.
Returns a number of columns
Add new column to the List. Arguments are:
Column title
class for the cell
Cell alignment
ID of the column. Should be unique for the List. This is field name for simple column.
Add nowrap tag to the cell
URL for the cell content. The string like #arg# is replaced with value of attribute arg of the object
Width of the cell
Add a column with an image. See add_column() for arguments. Additional arguments are:
URL for the image
Add a column. A method named ID will be called for cell content. See add_column() for arguments.
Add a column with ON|OFF state. Be default this column is linked to enabled object attribute. See add_column() for arguments.
The same as add_column_enabled(). See add_column() for arguments.
Add a system column. See add_column() for arguments. Additional arguments are:
Show ACL button
Show DELETE button
Show EDIT button
Show SELECTED checkbox
Show EXPORT button
Add a button Create new in action bar.
Button caption
Add a button Delete in action bar.
Button caption
Add combo-box to the list. See add_column() for arguments. Additional parameters are
Parameters for CGI::popup_menu
Draw the list.
List of parameters to pass to restore_where() function of ThePersistent object.

Default class for all table cells
ACTION attribute for the form. Default is $ENV{SCRIPT_NAME}
Default is GET
Default is 'theForm'
1 if there is more data after draw_list()
Number of pages in the List. Undef if unknown
Current page number
Space in pixels between rows
Rows to display per list page
The ThePersistent object to iterate
Rows fetched so far
Method name to call after each row
Method name to call before each row
Number of columns in the table.
combo-box default choice
url for icon_edit()

Sergey Rusakov, <rusakov_sa@users.sourceforge.net>