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

NAME

IWL::Tree::Row - a row widget

INHERITANCE

IWL::Object -> IWL::Widget -> IWL::Table::Row -> IWL::Tree::Row

DESCRIPTION

The Row widget provides a row for IWL::Tree. It inherits from IWL::Table::Row.

CONSTRUCTOR

IWL::Tree::Row->new ()

NOTICE

A valid ID attirbute for the row is required for most of the additional features to work. It is recommended to always set the ID of a IWL::Tree::Row object, although it is not enforced to do so.

METHODS

appendRow (ROW)

Adds a row as a child of another row in the tree.

Parameters: ROW - the row to be appended

Returns undef if the parent row doesn't belong to a tree, or no child row is passed

getChildRows (FLAT)

Returns a list of the row objects appended or empty list if no rows have been appended.

Parameters: FLAT - flase if the method should return all the subrows on all levels

expand (BOOL)

Expands or collapses the row

Parameters: BOOL - true if the row should be expanded

makeParent

Makes the row a parent row, even if it currently has no children

getPath

Returns the row's path. The path itself is set when the row is appended to the tree or to another row.

setPath

Sets the row's path explicitly. The path then can be used to append child rows.

getPrevRow

Returns the previous row on the same level.

getNextRow

Returns the next row on the same level.

setSelected (BOOL)

Sets whether the row is the currently selected row.

Parameters: BOOL - true if the row should be selected

setAjaxExpand (url, params)

Sets the _is_parent flag on. Thus the row will be presented as expandable for the ajax expansion. It will also set to call URL with params for the expansion.

METHODS

getParentRow

Returns the parent rows of the current row, if it has any

getFirstChildRow

Returns the first childr row of the current row.

getFromPath (PATH)

Returns a row from a given path

Parameters: PATH - the path array

setNavigation (BOOL)

setNavigation is used to enable or disable the naviagtion of the row. by default the navigation is enabled.

Parameters: BOOL - a boolean value, true if navigation should be enabled

makeSortable (COL_NUM, [CALLBACK, URL])

Sorts the tree when the column is clicked. Should only be used for header rows.

Parameters: COL_NUM - the column number, which will be used for sorting. CALLBACK - an optional callback to be called instead of the default, URL - URL of an ajax script to sort the tree and return the new content (with getContent()), CALLBACK has no effect if URL is set.

LICENCE AND COPYRIGHT

Copyright (c) 2006-2007 Viktor Kojouharov. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perldoc perlartistic.

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.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 280:

You forgot a '=back' before '=head1'

Around line 510:

You forgot a '=back' before '=head1'