new()initialize()handle_request()columns()columns_count()add_column()add_column_image()add_column_image()add_column_enabled()add_column_image()add_column_system()add_button_create()add_button_delete()add_cb()draw_list()restore_parameters()
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>
new()Object contructor. Takes the same arguments as initialize()
initialize()Object initializer. See Attributes for details.
handle_request()Handle request and do redirect if needed. Return new location.
columns()Returns array of ListColumn objects.
columns_count()Returns a number of columns
add_column()Add new column to the List. Arguments are:
class for the cell
nowrap tag to the cell
arg of the object
add_column_image()Add a column with an image. See add_column() for arguments. Additional arguments are:
add_column_image()Add a column. A method named ID will be called for cell content. See
add_column() for arguments.
add_column_enabled()Add a column with ON|OFF state. Be default this column is linked to
enabled object attribute. See add_column() for
arguments.
add_column_image()The same as add_column_enabled(). See add_column() for arguments.
add_column_system()Add a system column. See add_column() for arguments. Additional arguments are:
add_button_create()Add a button Create new in action bar.
add_button_delete()Add a button Delete in action bar.
add_cb()Add combo-box to the list. See add_column() for arguments. Additional parameters are
CGI::popup_menu
draw_list()Draw the list.
restore_parameters()List of parameters to pass to restore_where() function of ThePersistent
object.
icon_edit()
Sergey Rusakov, <rusakov_sa@users.sourceforge.net>