Hi Chris, Sorry about the late reply. Here is something I sent to Matt Sergeant a while in February. Apologies if this problem has been fixed since.
Cheers, Michael. > Subject: Re: f:single-select bug > On Thu, 5 Jun 2003, Christopher B. Liebman wrote: > Did you ever solve this? I am having the same problem, if the form had > errors my single-select list do not get populated... > > > -- Chris > ---------- Forwarded message ---------- Date: Thu, 20 Feb 2003 11:02:44 +1100 (EST) From: [EMAIL PROTECTED] To: Matt Sergeant <[EMAIL PROTECTED]> Subject: PerForm bug Hi Matt, First up, thanks for AxKit. It's great. Im referring to the 2 messages Ive sent to the axkit users mailing list. Jorg's suggested solution didnt work so I dug into the PerForm code .. Anyway I think I've found (and fixed) a bug in PerForm.pm v1.7 (diff attached). Basically in single_select and multi_select subs the load_<filename> sub (or <f:options> child element as appropriate) is only used to populate the dropdowns when the __submitting field isnt set. But this means that nothing is loaded into them at all when validation fails (in another form field for example)! This is obviously undesirable. My change to PerForm just always load up the dropdowns. If this a 'usage bug' instead of a 'code bug' could you please let me know how to use existing PerForm to achieve same functionality? Thanks again! Michael. ---------- Forwarded message ---------- Date: Mon, 17 Feb 2003 10:40:03 +1100 (EST) From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: f:single-select bug Hi, I still cant get single-selects to populate after a submit ... The following __very__ simple page works as expected on initial load (ie drop down populated) but after submitting the form, an empty drop-down/single-select comes back ... an apache error log produced with AxDebugLevel 10 is attached ... Thanks! -Michael <xsp:page xmlns:xsp="http://apache.org/xsp/core/v1" xmlns:f ="http://axkit.org/NS/xsp/perform/v1" > <f:form name="test"> Group: <f:single-select name="ts"> <f:options> <option> <name>a</name> <value>b</value> </option> <option> <name>c</name> <value>d</value> </option> </f:options> </f:single-select> <br /> <f:submit name="save" value="Save" /> </f:form> </xsp:page>
error_log.gz
Description: gzip-ed error_log
450c450
< elsif (defined &{"${package}::load_${name}"}) {
---
> if (defined &{"${package}::load_${name}"}) {
453c453
< elsif (!$params->{'__submitting'}) {
---
> elsif (@{$option}) {
568c568
< elsif (defined &{"${package}::load_${name}"}) {
---
> if (defined &{"${package}::load_${name}"}) {
571c571
< elsif (!$params->{'__submitting'}) {
---
> elsif (@{$option}) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
