Sergey Rusakov > ePortal-4.5 > ePortal::HTML::List

Download:
ePortal-4.5.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 4.5   Source  

NAME ^

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

SYNOPSIS ^

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>

METHODS ^

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:

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

draw_list()

Draw the list.

restore_parameters()

List of parameters to pass to restore_where() function of ThePersistent object.

List Attributes ^

AUTHOR ^

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

syntax highlighting: