CGI-Bus
view release on metacpan or search on metacpan
lib/CGI/Bus/wg.pod view on Meta::CPAN
=head1 NAME
CGI::Bus::wg - Widgets
=head1 SYNOPSIS
use CGI::Bus;
$s =CGI::Bus->new();
$s->wg->ddlb(...);
=head1 DESCRIPTION
This module is a collection of HTML widgets.
Some of them are extended envelopes of L<CGI|CGI> methods.
The others are associated with a several basic HTML widgets.
See L<CGI::Bus::Base|CGI/Bus/Base> for inherited slots and methods.
=head1 SLOTS
=over
None
=back
=head1 METHODS
=over
=item ddlb (false, name, data, field name,...) -> HTML drop-down list box
=item ddlb (widget | false, name, data, [field name => label],...)
Generate input helper drop-down list box HTML.
Optional 'widget' parameter (html, '$_' placeholder, any other string or empty value),
is used only to be placed after some javascript may be generated.
Name is used as the common part of names of the HTML widgets - submits,
scrolling_list, buttons, which names are generated by appending '_' sign
and suffix.
Data may be array ref with list of values,
hash ref with internal and external values,
sub{} to produce above.
Other arguments are field names to fill with values.
Field names with leading "\t" corresponds to multivalue fields,
leading "\tmsab\t" hints to try Microsoft Address Book before if possible.
=item fsdir ( name, edit?, allow edit?, files path, URL, ?filesystemURL, ?rows, ?cols )
Generate filesystem directory editor HTML.
This may be IE HTML IFRAME tag pointed to filesystem,
URLs, or filefield for upload files and checkboxes to delete.
Name is used as the common part of names of the HTML widgets.
'index.html' or 'index.htm' file may be embedded below file list
when view mode.
=item textarea (-name=>...,-arows=>min, -hrefs=>1,...) -> textarea HTML
Like C<CGI::textarea> call, but with additional attributes:
-arows=>min autosizes widget to it's content.
-hrefs=>1 searches HTML hyperlinks in content and displays them,
special URL protocols may be used and translated:
'host://' -> '/',
'url://' -> relative script name.
-htmlopt=>1 is to autodetect and use in view mode HTML data format,
it is ignored (deleted).
=item textfield (-name=>..., -asize=>min) -> textfield HTML
Like C<CGI::textfield> call, but with additional attributes:
-asize=>min autosizes widget to it's content.
=back
=head1 VERSION
=over
=head2 26/11/2004
=item Changed:
New C<ddlb> optional 'field' parameter.
=head2 22/11/2004
=item Changed:
C<ddlb> gives default value from the first field.
Double clicking C<ddlb> invokes the first field filling.
=head2 18-19/11/2002
=item Changed:
C<fsdir> displays now filesystem URLs only in edit mode.
Files URLs supplied with '_blank' option.
=head2 31/10/2002
( run in 1.336 second using v1.01-cache-2.11-cpan-b16cb0d3907 )