[jifty-devel] Custom input processing on custom subclassed
Sean E. Millichamp
sean at bruenor.org
Sat Sep 30 16:19:54 EDT 2006
On Wed, 2006-09-27 at 20:49 -0400, Jesse Vincent wrote:
> I've been meaning to reply to this for um. a couple weeks now, but I
> keep not getting to it. I do think you're 100% right that a
> Jifty::Web::Form::Field should have some sort of post-handler. I guess
> the problem comes in that there isn't a way to know what form field
> class rendered a given argument.
Thanks for the reply Jesse.
Doesn't the response contain the action associated with each form field?
And, if so, can't the action be asked which form field class the
argument was rendered with? And then once you have that information,
then the form field class can be accessed to do the conversion.
It certainly is more then a 2 line patch, but it seems possible to me.
Do you think this approach sounds workable or do you think I am making
assumptions that aren't safe? If so, at what point in the incoming
request do you think it should happen? If you could point me to a
module/function where you'd tack it in I would appreciate it since the
whole incoming request process is a little murky for me.
The other option I see would be to store it explicitly somehow in the
form with each field and pass it back into Jifty. It means less
detective work in the request processing, but more bandwidth used in the
request/responses. Perhaps, for any field field class with a custom
post-handler, store it in a hidden form field with the class name and
then the incoming request processing could be significantly simplified.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20060930/38c1a1fe/attachment.pgp
More information about the jifty-devel