Forum OpenACS Development: anybody know the flow for how RP/templates works?

I am trying to shoot a bug in my own code where a multi-row template
variable is not found over in the corresponding .adp file. A scalar
template variable is found and displays correctly in the same .adp
file.

I need to fish down somewhere into the request processor/template
code but I am not sure where to start looking. Has any one swam
(swum?) through this stuff before? I am not sure even how or where
the RP gets control and where the template variables are parsed/set.

Any help is appreciated. I guess I will probably just start looking
at 0-procs.tcl.

Regards..

Are you using the standard db API or the (deprecated and before long ripped out, I hope) templating system db API?

Regarding the standard db API, db_multirow puts the value at the template level while all the others put the value at the caller's level.  This is an artifact of template integration, I guess (db_multirow is only useful when you're passing a rowset to a template, while the other db_* procs are also used to return values used directly in the calling script).

I have seen you guys talking about this, but I do not know what the template system db api is. I am just trying to refer to the data in the .adp file as @var_name.col_name@.

What you are saying is correct in that it has something to do with the levels (caller's vs. template) because I also cannot reference these variables in the .tcl file containing the db_multirow. I dug down into db_multirow and he definitely gets the data from the DB, but I am not sure how those weird upvar commands work inside db_multirow.

Very similar code to this works fine in one of my routines that is invoked directly (i.e. from a link). This code is executed as a result of a button (i.e. form). And I was able to check that all of the variables (in this case, set checkboxes) are coming in OK.

So I probably am not setting some param since I am being invoked as a form. Also I have no idea how the data gets from the db_multirow out to the @var@ reference.

Just got to keep digging...

Regards..