Alberto Valverde schrieb:
>
> On Aug 28, 2007, at 9:06 PM, Diez B. Roggisch wrote:
>
>> Ok, I tried the retrieve_javascript-function as well as a simple
>> javascript-property.
>>
>> So my widget looks like this:
>>
>> class TagInputWidget(Widget):
>>
>> template = """
>> <input xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:py="http://genshi.edgewall.org/"
>> type="text"
>> name="name"
>> />
>> """
>> javascript = [JSSource("""
>> alert("huhu");
>> """)]
>>
>>
>>
>> But this gives me the error
>>
>> File
>> "/Users/deets/Projects/privat/TurboGears/Versions/TG11/lib/
>> python2.5/Genshi-0.4.4-py2.5.egg/genshi/input.py",
>> line 41, in ET
>> tag_name = QName(element.tag.lstrip('{'))
>> AttributeError: 'Stream' object has no attribute 'tag'
>>
>
> Make sure you set the "engine_name" attribute to "genshi" and that
> toscawidgets.framework.default_view is the engine name of the (page)
> template your widget is being rendered on. This should default to
> tg.defaultview so it should have a sane default unless you're mixin
> template languages for paget templates.
The page-templates I use are genshi, and the defaultview is set to
genshi as well. But this widget
class TagInputWidget(Widget):
template = """
<input xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
type="text"
name="name"
/>
"""
javascript = [JSSource("""
alert("huhu");
""")]
engine_name = 'genshi'
still gives the same error.
Thanks for the help so far,
diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---