Forum OpenACS Q&A: Re: return from tcl without parsing adp?

Collapse
Posted by tammy m on
Hi

Thanks again all for the help and especially code samples:)

What I ended up doing was basically like this simple sample. I think this works best for me because I really didn't wanna have to pass all my variables as query parameters to the adp page... there is going to be about 60 of them POSTed to the original FORM page afterall!

Page that is requested by user's browser

ad_page_contract {

    ad_page_contract basic usage:
        1st arg: comments on current page params + usage
        2nd arg: parameters current tcl page is expecting to receive
        3rd arg: -properties flags "properties" or parameters passed to
                adp page associated with this tcl page (ad_return_template)
        
    @creation-date 06/13/2003
    @cvs-id $Id: $
} {            
}          
   rp_form_put first_name Scooby
   rp_form_put last_name Doo
   rp_internal_redirect my-display-page
   ad_abort_script

my-display-page.tcl

ad_page_contract {

    ad_page_contract basic usage:
        1st arg: comments on current page params + usage
        2nd arg: parameters current tcl page is expecting to receive
        3rd arg: -properties flags "properties" or parameters passed to
                adp page associated with this tcl page (ad_return_template)
        -query flags args POSTed to adp via ad_return_redirect or  rp_internal_redirect.
               See return from tcl without parsing adp?
               
               Be *really* careful about recursion using rp_internal_redirect.
               There is no protection as far as I can tell. Symptoms are sudden
               unexplainable aolserver restarts.

    @creation-date 06/13/2003
    @cvs-id $Id: $
} {
  {first_name:notnull "NO firstname:("}
  {last_name:notnull "NO lastname:("}
} 

my-display-page.adp

              
 

FORM input received

@first_name@ @last_name@