#742: TextArea value-setting inconsistent with other widgets
-----------------------------------+----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: anonymous
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Widgets | Version: 0.9a4
Severity: normal | Resolution: invalid
Keywords: |
-----------------------------------+----------------------------------------
Changes (by michele):
* status: new => closed
* resolution: => invalid
Comment:
As you can see:
http://www.w3schools.com/tags/tag_textarea.asp
A textarea tag doesn't support a "value" attribute, that's what you are
trying to set by using attrs.
Second point, you shouldn't modify attributes of a widget in this way
since this is not thread-safe.
You don't need get_field_by_name (me wants private methods, I will
probably rename it to _get_field_by_name).
What you need is passing at display time the value you want to give to
your TextArea widget:
{{{
#!python
def add(self, ...)
value = dict(desc="correct text")
return dict(form=form, value=value)
}}}
in your template
{{{
#!html
<div py:content="form.display(value=value)" />
}}}
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/742>
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 [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-tickets
-~----------~----~----~----~------~----~------~--~---