Commit 47ed2379 authored by Nicolas Delaby's avatar Nicolas Delaby

Pass some usefull arguments inside xml structure.

This patch allow to render OOoChart inside deferred_style (asynchronous)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24670 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 40bc8c1f
......@@ -400,10 +400,15 @@ class OOoChartWidget(Widget.Widget):
here = getattr(form, 'aq_parent', REQUEST)
REQUEST.set('render_prefix', render_prefix)
#needed to update REQUEST
self.getArgumentDict(field, REQUEST)
content = '''
<office:include path="%s/ERP5Site_buildChart" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed"/>
''' % here.getPath()
argument_dict = self.getArgumentDict(field, REQUEST)
from xml.marshal.generic import dumps
dump_args = dumps(argument_dict)
#remove xml declaration (first processing node)
dump_args = dump_args[dump_args.index('?>')+2:]
content = '''<office:include path="%s/ERP5Site_buildChart"
xlink:type="simple" xlink:actuate="onLoad"
xlink:show="embed">%s</office:include>
''' % (here.getPath(), dump_args)
return content
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment