Problem with using Mason subrequest
------------------------------------
Calling a component to display more data on the HTML page:
<& results_table.m,
TableKeys => \%TableKeys,
CheckBoxKeys => \%CheckBoxKeys,
TableOrder => [EMAIL PROTECTED],
objQuery => $objQuery
&>
The above code works correctly.
But I want to create a new page with the wrapping chain and not append the HTML to the existing page.
So I tried this code to create a subrequest. I also tried subexec().
<%perl>
my $req = $m->make_subrequest(comp => 'results_table.m',
args => [
TableKeys => \%TableKeys,
CheckBoxKeys
=> \%CheckBoxKeys,
TableOrder => [EMAIL PROTECTED],
objQuery => $objQuery
],
);
$log->debug("req ".Dumper($req));
$req->exec;
</%perl>
Got this error:
error: no value sent for required parameter 'TableKeys'
context:
...
903: $comp->dynamic_subs_init;
904: $comp->dynamic_subs_request($m);
905: }
906:
907: return $comp->run_dynamic_sub($key, @args);
908: }
909:
910: sub call_next {
911: my ($self,@extra_args) = @_;
...
code stack: /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm:907
/opt/tdw/mason/data/obj/155763555/results/results_table.m.obj:9
/opt/tdw/mason/w3v8/content.m:34
/opt/tdw/mason/w3v8/body.m:23
/opt/tdw/mason/autohandler.m:82
When I look at the $req data dumped in the above $log statement [Log4Perl]:
...
...
'request_args' => [
'TableKeys',
{
'runTestTeam' =>
$VAR1->{'ah'}{'interp'}{'code_cache'}{'/results/results_form.m'}{'comp'}{'dynamic_subs_request'}{'stack'}[4][1][1]{'runTestTeam'},
'runProductBuild' =>
$VAR1->{'ah'}{'interp'}{'code_cache'}{'/results/results_form.m'}{'comp'}{'dynamic_subs_request'}{'stack'}[4][1][1]{'runProductBuild'},
'runLocale' =>
$VAR1->{'ah'}{'interp'}{'code_cache'}{'/results/results_form.m'}{'comp'}{'dynamic_subs_request'}{'stack'}[4][1][1]{'runLocale'},
'runOS' =>
$VAR1->{'ah'}{'interp'}{'code_cache'}{'/results/results_form.m'}{'comp'}{'dynamic_subs_request'}{'stack'}[4][1][1]{'runOS'}
},
'CheckBoxKeys',
{
'runOS' =>
$VAR1->{'ah'}{'interp'}{'code_cache'}{'/results/results_form.m'}{'comp'}{'dynamic_subs_request'}{'stack'}[4][1][3]{'runOS'},
'runResultGrouping' =>
$VAR1->{'ah'}{'interp'}{'code_cache'}{'/results/results_form.m'}{'comp'}{'dynamic_subs_request'}{'stack'}[4][1][3]{'runResultGrouping'}
},
'TableOrder',
[
'runTestTeam',
'runProductBuild',
'runOS'
],
'objQuery',
....
....
The above looks like the arguments are in the $req. I'm stuck!
Any ideas what I am doing wrong or what I should check?
Using Perl version v5.8.5 for Apache/2.0.52
$HTML::Mason::VERSION = '1.31';
Apache Request 2.06-dev
Mod perl 2.01
Thanks in advance,
Tim Burchell

