LEGAL
#===========================================================================
Copyright (C) 2008 by Nik Ogura. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bug reports and comments to nik.ogura@gmail.com.
#===========================================================================
NAME
CGI::Lazy::Ajax::Composite
SYNOPSIS
use CGI::Lazy;
our $q = CGI::Lazy->new('/path/to/config/file'); our $composite = $q->ajax->composite({ id => 'stuff', children => [], );
DESCRIPTION
Composite is a container for other widgets. It allows you to perform actions on multiple widgets at once. Depending on the relationship between the widgets, and how fancy you get, you may need to play with each subwidget by hand.
METHODS
childarray ()
Returns array of composite widget's children
children ()
Returns hashref of composite widget's children
contents (args)
Generates widget contents based on args.
args
Hash of arguments. Common args are mode => 'blank', for displaying a blank data entry form, and nodiv => 1, for sending the contents back without the surrounding div tags (javascript replaces the contents of the div, and we don't want to add another div of the same name inside the div).
display (args)
Displays the widget initially. Calls $self->contents, and adds preload lookups and instance specific javascript that will not be updated on subsequent ajax calls.
args
Hash of arguments
new (q, vars)
Constructor.
q
CGI::Lazy object.
vars
Hashref of object configs.
id => widget id (manditory)
children => arrayref of child widgets (manditory)