hi diez,

thanks for your consideration.

On Tue, Aug 18, 2009 at 09:58, Diez B. Roggisch<[email protected]> wrote:

[email protected] schrieb:

hello friends,

i am building a form based on the parameters to the controller, and i
need to also call the same controller as an error_handler.
how could the error_handler receive parameters based on the submitted
form values?
of course, reading the form values would be enough (instead of receiving
them as parameters).

I'm not entirely sure what you mean here - building a form on the fly
isn't to great of an idea with current TW, as that is going to produce
memleaks.

i'd like of course to learn about these mem leaks, to know how to avoid them.
i'm building a widgetlist on the fly, with widgets of types and quantity 
determined by data.

However, what you can do is you can pass an object with a
validate()-method to the @validate-decorator. Then in there, you can
access tg.request.params to build the same form for validation.

so you suggest tg.request.params has the params of the request. are they passed 
to the error_handler method? how else does it populate the fields?

now for the question i didn't ask, though i should have:
can the @validate form be built on the fly too? i was previously thinking to 
build a form with all possible fields, that's a definitely suboptimal solution.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---




many thanks,
--
alex

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to