#777: Impossible to programatically set an AutoCompleteField default value
----------------------+-----------------------------------------------------
 Reporter:  godoy     |       Owner:  anonymous
     Type:  defect    |      Status:  new      
 Priority:  high      |   Milestone:  0.9a5    
Component:  CherryPy  |     Version:  0.9a4    
 Severity:  critical  |    Keywords:           
----------------------+-----------------------------------------------------
 Hi!  With the following widget declaration I am not being able to set the
 value of its text_field programatically:

 {{{
     endereco = widgets.AutoCompleteField(
         search_controller="/clientes/search_endereco",
         search_param="endereco",
         result_name="enderecos",
         text_field = widgets.TextField(name = 'endereco_text',
                                        attrs = {'size':51},
                                        label = _(u'Endereço'),
                                        validator =
 validators.UnicodeString(if_empty = None)),
         )
 }}}

 I've tried attributing values to it using the following idioms:

  * dict(endereco = value)
  * dict(endereco_text = value)
  * dict(text_field = value)
  * dict(text = value)
  * dict(widget = value)
  * {'endereco.widget': value}

 and some more combinations based on the generated HTML and the source
 code.  I can't precisely say when this started hapenning, but it was with
 some of the latest changes.

 Here I have:
 {{{
 % tg-admin info | sort
 cElementTree 1.0.5-20051216
 Cheetah 1.0
 CherryPy 2.2.0
 elementtree 1.2.6
 elementtree 1.2.6
 FormEncode 0.5.1
 FormEncode 0.5.1
 kid 0.9
 nose 0.8.4
 Paste 0.5
 PasteDeploy 0.5
 PasteScript 0.5
 PyProtocols 1.0a0
 RuleDispatch 0.5a0
 setuptools 0.6a11
 simplejson 1.3
 SQLObject 0.7.1dev-r1707
 TurboGears 0.9a5dev-r1207
 TurboJson 0.9.2dev-r1204
 TurboKid 0.9.4dev-r1123
 }}}

 This makes this kind of field unusable for editing data.

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/777>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to turbogears-tickets@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to