$cgi Must be a CGI object (version 3.15 is tested) $nbArgs Must be a valid positive integer . Represent the number of arguments the generated page will be able to handle for the command.
Usage: my $page = AEAE::AsyncCGIPage($cgi , $nbArgs );
Properties you can set:
$page->command('Command') ;
The class that implements the command to execute. This class must inherit from AEAE::Command (see this module for more info).
$page->arguments(['arg1','arg2']) ;
A reference on a array of the arguments to give to the command. These arguments have to be strictly strings (or number).
$page->debug(0|1);
Switch on/off debug mode. In debug mode, you see ajax calls at the bottom of the page.
$page->autoStart(0|1);
If 1 , tells the page to automatically start the command, without waiting for the user to click on the start button.
$page->onAbortURL('http://.....');
Redirect there when user push the abort button. If not set, it just make a back.
$page->onCompleteURL('http://.....');
Redirect there when the command is complete and throw no errors.
$page->checkInterval(5000);
In ms, the time between two refresh of the progress bar. Dont go below 3000 since we experiments some problems with IE with a short interval.
$page->message('doing wonderfull command');
Sets the message to show to the user while the command is executing. The default is ok at devellopment time !
$page->headCode('<meta ....');
Anything you want to insert in the head part of the generated html. Please take care being html compliant. You may break the component if not.
$page->beforeComponentHTML('<.....>');
Anything you want to insert before the component. Same notice as before.
$page->afterComponentHTML('<...>');
Anything you want to insert after the component. Same notice as before.
$page->barBgColor('#TOTOTO');
The color used in the background of the progress bar
$page->barFgColor('#TOTOTO');
The color used in the foreground of the progress bar
Return the setted message or a default message build on command and arguments given.
Return a string to be sent at the client. It is ajaxed HTML with CGI::Ajax !