[tg-tickets] Re: [TurboGears] #777: Impossible to programatically set an AutoCompleteField default value

2006-04-23 Thread TurboGears
#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  |   Resolution:   
 Keywords:|  
--+-
Changes (by godoy):

  * component:  Widgets = CherryPy

Comment:

 In my controller I have this:

 {{{
 valores = dict(
 # ...
 endereco = dict(endereco_text = fornecedor.endereco),
 # ...
 )

 return dict(
 # ...
 data = valores,
 # ...
 )
 }}}

 and in my Kid template I have:

 {{{
 span py:replace=formulario.display(value = data,
 action='%s/update/' % root_link, method = 'post') /
 }}}

 So if you're asking about the nested dicts I believe I did, unless you
 were asking about a third level -- mine only has two levels.

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



[tg-tickets] Re: [TurboGears] #777: Impossible to programatically set an AutoCompleteField default value

2006-04-23 Thread TurboGears
#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  |   Resolution:   
 Keywords:|  
--+-
Comment (by alberto):

 You're last example should be working... This is certainly a bug.

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



[tg-tickets] Re: [TurboGears] #777: Impossible to programatically set an AutoCompleteField default value

2006-04-23 Thread TurboGears
#777: Impossible to programatically set an AutoCompleteField default value
--+-
 Reporter:  godoy |Owner:  anonymous
 Type:  defect|   Status:  new  
 Priority:  high  |Milestone:  0.9a5
Component:  Widgets   |  Version:  0.9a4
 Severity:  critical  |   Resolution:   
 Keywords:|  
--+-
Comment (by alberto):

 {{
 value = dict(endereco=dict(text=Something))
 form.display(value=value)
 }}}

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



[tg-tickets] Re: [TurboGears] #777: Impossible to programatically set an AutoCompleteField default value

2006-04-23 Thread TurboGears
#777: Impossible to programatically set an AutoCompleteField default value
--+-
 Reporter:  godoy |Owner:  anonymous
 Type:  defect|   Status:  new  
 Priority:  high  |Milestone:  0.9a5
Component:  Widgets   |  Version:  0.9a4
 Severity:  critical  |   Resolution:   
 Keywords:|  
--+-
Comment (by godoy):

 Nope, it didn't work.  I even added a third level dictionary at my
 controller...

 I'll try reproducing it in a minimal application and I'll attach it here
 (if I don't find my mistake while doing that).

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



[tg-tickets] Re: [TurboGears] #777: Impossible to programatically set an AutoCompleteField default value

2006-04-23 Thread TurboGears
#777: Impossible to programatically set an AutoCompleteField default value
--+-
 Reporter:  godoy |Owner:  anonymous 
 Type:  defect|   Status:  closed
 Priority:  high  |Milestone:  0.9a5 
Component:  Widgets   |  Version:  0.9a4 
 Severity:  critical  |   Resolution:  worksforme
 Keywords:|  
--+-
Changes (by anonymous):

  * status:  new = closed
  * resolution:  = worksforme

Comment:

 It's not a bug in AutoCompleteField but in you app. Try:
 {{{
 #!py
 @turbogears.expose(html = 'ticket777.templates.clients')
 def index(self):
 values = dict(
 endereco = dict(endereco_text = 'Default Value'),
 )
 }}}

 In the Clients controller. You had 'addresses' instead of 'endereco' and
 'text' instead of 'endereco_text'. A snippet form the form so you can
 compare:

 {{{
 #!py
 class widgets_clients_addresses(widgets.WidgetsList):
 endereco = widgets.AutoCompleteField(
 search_controller=/clients/search_address,
 search_param=address,
 result_name=addresses,
 text_field = widgets.TextField(name = 'endereco_text',
attrs = {'size':51},
label = _(u'Endereço'),
validator =
 validators.UnicodeString(if_empty = None)),
 )

 my_form_address = widgets.TableForm(fields = widgets_clients_addresses())
 }}}

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



[tg-tickets] Re: [TurboGears] #777: Impossible to programatically set an AutoCompleteField default value

2006-04-23 Thread TurboGears
#777: Impossible to programatically set an AutoCompleteField default value
--+-
 Reporter:  godoy |Owner:  anonymous 
 Type:  defect|   Status:  closed
 Priority:  high  |Milestone:  0.9a5 
Component:  Widgets   |  Version:  0.9a4 
 Severity:  critical  |   Resolution:  worksforme
 Keywords:|  
--+-
Comment (by godoy):

 Silly me.  Indeed it works and I haven't fully searched and replaced the
 text from my application to this test case.

 Sorry...  So, it is some bug in my code that I need to find.  Probably
 something as silly as this :-)

 Thanks for your time.

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