On Feb 6, 2008 1:21 PM, Jorge Godoy <[EMAIL PROTECTED]> wrote:

>
> Em Wednesday 06 February 2008 13:42:29 Christoph Zwerschke escreveu:
> > For one of my projects I created an AutoCompleteTextField widget that
> > behaves like the standard AutoCompleteField widget, with the difference
> > that it is not a CompoundWidget, but a TextField. This allows you to add
> > auto complete functionality to ordinary TextFields without having to go
> > through large modifications, simply by prepending "Auto" to the name of
> > the widget class and adding a search controller. Unfortunately, the
> > standard AutoCompleteField cannot simply replace a TextField in a TG
> > form because it is a CompoundWidget with an additional hidden field for
> > e.g. handing over a primary key,  that needs different validation etc.
> >
> > Anybody interested in adding this to the standard TG widgets?
>
> It would be more interesting if this change was based on another attribute
> or
> something like that...  Having it on the name of the widget might require
> too
> many changes on the code.
>
> What about, for example, some "auto=True" attribute instead?
>
> --
> Jorge Godoy      <[EMAIL PROTECTED]>


I think having it as a seperate widget is fine, since one is a CompundWidget
and the other isn't.  Even with changing the behavior based on an attribute,
you would likely have to make other changes in your code in order to switch
between them.

Kevin Horn

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to