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:
title
Column title
class
class for the cell
align valign
Cell alignment
id
ID of the column. Should be unique for the List. This is field name for simple column.
nowrap
Add nowrap tag to the cell
url
URL for the cell content. The string like #arg# is replaced with value of attribute arg of the object
arg
width
Width of the cell
Add a column with an image. See add_column() for arguments. Additional arguments are:
src
URL for the image
Add a column. A method named ID will be called for cell content. See add_column() for arguments.
ID
Add a column with ON|OFF state. Be default this column is linked to enabled object attribute. See add_column() for arguments.
enabled
The same as add_column_enabled(). See add_column() for arguments.
Add a system column. See add_column() for arguments. Additional arguments are:
acl
Show ACL button
delete
Show DELETE button
edit
Show EDIT button
checkbox
Show SELECTED checkbox
export
Show EXPORT button
Add a button Create new in action bar.
value
Button caption
Add a button Delete in action bar.
Add combo-box to the list. See add_column() for arguments. Additional parameters are
values labels default
Parameters for CGI::popup_menu
CGI::popup_menu
Draw the list.
List of parameters to pass to restore_where() function of ThePersistent object.
Default class for all table cells
form_action
ACTION attribute for the form. Default is $ENV{SCRIPT_NAME}
form_method
Default is GET
form_name
Default is 'theForm'
more_data
1 if there is more data after draw_list()
pages
Number of pages in the List. Undef if unknown
page
Current page number
rowspan
Space in pixels between rows
rows_per_page
Rows to display per list page
obj
The ThePersistent object to iterate
rows_fetched
Rows fetched so far
after_row
Method name to call after each row
before_row
Method name to call before each row
total_columns
Number of columns in the table.
list_cb
combo-box default choice
edit_url
url for icon_edit()
Sergey Rusakov, <rusakov_sa@users.sourceforge.net>
1 POD Error
The following errors were encountered while parsing the POD:
Expected '=item *'
To install ePortal, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ePortal
CPAN shell
perl -MCPAN -e shell install ePortal
For more information on module installation, please visit the detailed CPAN module installation guide.