I've been having some trouble getting the PerForm taglib to work for me. I was hoping that someone on the list could help.
I have tried very simple scripts and some things that are not so simple. None of them work as expected. From the code: <?xml version="1.0"?> <xsp:page xmlns:xsp="http://apache.org/xsp/core/v1" xmlns:f="http://axkit.org/NS/xsp/perform/v1"> <page title="test"> <f:form name="login"> Username: <f:textfield name="username" width="30" maxlength="50"/> <br /> Password: <f:password name="password" width="30" maxlength="50"/> <br /> <f:submit name="save" value="Login" goto="/"/> </f:form> </page> </xsp:page> the form is generated correctly. I view the source in my browser and it has all of the fields, plus the hidden "__submitting" field. I hit submit on the browser and the form info is submited to the server. Then I go right back to the exact same page, but from how I understand PerForm, I should be redirected to "/". I've traced through the code and found that in the section of the PerForm code return <<EOT; end_form_${name}(\$_form_ctxt, \$cgi->param('__submitting')) if defined \&end_form_${name}; if (\$cgi->param('__submitting')) { foreach my \$cancel (\@_cancel_buttons) { The if statement fails. So cgi->param('__submitting') isn't defined. Any ideas for what might be causing this? I have noticed some other strange behavior. One of the first XSPs I wrote while testing doesn't work correctly(as in it sometimes works and simetimes doesn't). It consists of 2 pages. The first gives a listing of the Perl modules installed on the system, and then the second gives a listing of files for a particular module: Module list page: <?xml version="1.0"?> <xsp:page xmlns:xsp="http://apache.org/xsp/core/v1"> <xsp:structure> <xsp:import>ExtUtils::Installed</xsp:import> </xsp:structure> <modulelist> <xsp:logic> my $instmod = ExtUtils::Installed->new(); foreach my $module ($instmod->modules()) { my $version = $instmod->version($module) || "???"; <module> <name> <xsp:expr>$module</xsp:expr> </name> <version> <xsp:expr>$version</xsp:expr> </version> </module> } </xsp:logic> </modulelist> </xsp:page> File list page: <?xml version="1.0"?> <xsp:page xmlns:xsp="http://apache.org/xsp/core/v1"> <xsp:structure> <xsp:import>strict</xsp:import> <xsp:import>ExtUtils::Installed</xsp:import> <xsp:import>Apache</xsp:import> <xsp:import>Apache::Request</xsp:import> </xsp:structure> <module> <xsp:logic> { my $apr = Apache::Request->new($r); my $module = $apr->param("module") eq ""?"Perl":$apr->param("module"); my $instmod = ExtUtils::Installed->new(); <name> <xsp:expr>$module</xsp:expr> </name> <version> <xsp:expr>$instmod->version($module)</xsp:expr> </version> foreach my $file ($instmod->files($module)) { <file> <xsp:expr>$file</xsp:expr> </file> } } </xsp:logic> </module> </xsp:page> The first page seems to work fine. The second page however will sometimes work and sometimes not. When it doesn't work I get this output returned to the browser(after xsl is applied, I think): <?xml version="1.0" encoding="UTF-8"?> <html><head><title>Installed Perl Modules</title></head><body><table bgcolor="eeeeee" border="1"/></body></html> I've checked the error log and it doesn't show anything unusual happening. Onto the setup of the system: RedHat 7.0 with the RH build of apache 1.3.22 (release 1.7.1). mod_perl 1.26 installed from source (but I got the same behavior from mod_perl 1.24 from the RH RPM). Perl (from RH RPM) 5.6.0. AxKit 1.5 from source. PerForm 1.4 from source and several others all from source (WebUtils 1.3_90, Param 1.4, etc). I've been looking through this for several days now, trying to trace through the code, but I can't figure it out. Does someone out there maybe have a suggestion? Thanks, Andrew Parker --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
