[web2py] Re: Autocomplete problem ...

2013-01-31 Thread DenesL
Not an easy one. For the widget to work properly the field names should be created at call time not at init time but the callback uses the one from init. Minimizing backward incompatibilities is another concern. As an additional enhancement it could take a query to define a subset of the values

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread Massimo Di Pierro
Mind I think it should be possible to do: auto = SQLFORM.widgets.autocomplete(request,db.Person,id_field=db.Person.id ) db.define_table('Person', Field('name'), format='%(name)s') db.define_table('Relation', Field('name',db.Person), ('contact',db.Person)) db.Relation.name.w

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread Massimo Di Pierro
Can you submit a patch? On Tuesday, 29 January 2013 05:36:53 UTC-6, DenesL wrote: > > > You have found a bug. > > The problem is that identical field names are being generated in the form > for both Relation fields: > name="_autocomplete_Person_name_aux" ... > name="_autocomplete_Person_name_au

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread DenesL
You have found a bug. The problem is that identical field names are being generated in the form for both Relation fields: -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread Ivan Gazzola
I've deleted the db but error still remains ... Il giorno lunedì 28 gennaio 2013 16:32:10 UTC+1, Massimo Di Pierro ha scritto: > > I think your problem is corrupted data. You have "Pippo Pippo" in a field > that is either integer or reference. This can happen with sqlite if you > change a fie

[web2py] Re: Autocomplete problem ...

2013-01-28 Thread Massimo Di Pierro
I think your problem is corrupted data. You have "Pippo Pippo" in a field that is either integer or reference. This can happen with sqlite if you change a field type. Delete the database and start again. I do not think there is anything wrong with your code. On Sunday, 27 January 2013 15:51:33

[web2py] Re: Autocomplete problem ...

2013-01-27 Thread Ivan Gazzola
Il giorno giovedì 24 gennaio 2013 18:56:59 UTC+1, Massimo Di Pierro ha scritto: > > db.Relation.name.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field= > db.Person.id ) > > db.Relation.contact.widget=SQLFORM.widgetsre.autocomplete(request,db.Person,id_field= > d

[web2py] Re: Autocomplete problem ...

2013-01-24 Thread Massimo Di Pierro
db.Relation.name.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field= db.Person.id ) db.Relation.contact.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field= db.Person.id ) should be db.Relation.name.widget=SQLFORM.widgets.autocomp