Date: | Mon, 25 Aug 2003 21:24:36 +1000 |
From: | Matthew Smith <grover [...] gil.com.au> |
To: | bug-AxKit-XSP-PerForm [...] rt.cpan.org |
Subject: | textfield load sub arguments wrong |
I recently found that the third argument to my textfield subs (as
defined in my XSP doc) gets skipped so that if I write:
<?xml version="1.0"?>
<xsp:page
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:f="http://axkit.org/NS/xsp/perform/v1"
xmlns:web="http://axkit.org/NS/xsp/webutils/v1"
Show quoted text
>
<xsp:logic><![CDATA[
sub load_mytextfield {
my ($ctxt, $default, $current, $index) = @_;
warn("TEST: @_");
# do stuff...
return "Current: $current, Index: $index";
}
]]>
</xsp:logic>
<page>
<p>
<f:form name="fred">
<xsp:logic>
for my $counter (1..10) {
<p><xsp:expr>$counter</xsp:expr>:
<f:textfield name="mytextfield">
<f:index><xsp:expr>$counter</xsp:expr></f:index>
</f:textfield>
</p>
}
</xsp:logic>
<f:submit name="test" value="Submit" goto="." />
</f:form>
</p>
</page>
</xsp:page>
The index ends up being assigned to $value (as can be seen in the text
box outputs.
Work around is to pretend there is no $value param being passed in.
matt