Skip Menu |

This queue is for tickets about the AxKit-XSP-PerForm CPAN distribution.

Report information
The Basics
Id: 3329
Status: new
Priority: 0/
Queue: AxKit-XSP-PerForm

People
Owner: Nobody in particular
Requestors: grover [...] gil.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
From: grover [...] gil.com.au
Clarification: Where it says: sub load_mytextfield { my ($ctxt, $default, $current, $index) = @_ $current gets assigned the value I was expecting for $index. Yet the PerForm.pm code lists them in this order when it makes the call. matt grover@gil.com.au