AxKit-XSP-PerForm

 view release on metacpan or  search on metacpan

PerForm.pm  view on Meta::CPAN

789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
    
  sub submit_save {
      my ($ctxt) = @_;
      # save values to a database
      warn("User: ", $ctxt->{Form}{firstname}, " ", $ctxt->{Form}{lastname}, "\n");
  }
 
Now these methods need to be global to your XSP page, rather than "closures"
within the XSP page's main handler routine. How do you do that? Well it's
simple. Just put them within a <xsp:logic> section before any user defined
tags. For example, if your XSP page happens to use XHTML as it's basic
format (something I do a lot), your page might be constructed as follows
(namespace declarations omitted for brevity):
 
  <xsp:page>
    <xsp:logic>
    ... form logic here ...
    </xsp:logic>
     
    <html>
    <head><title>An Example Form</title></head>



( run in 0.230 second using v1.01-cache-2.11-cpan-00829025b61 )