On 8/31/2011 4:15 AM, Jacques Le Roux wrote:
widget.properties's widget.verbose setting has precedence over
web.xml's widgetVerbose setting. So you can't use
parameters.widgetVerbose to override widget.verbose to false. Is
ModelWidget.widgetBoundaryCommentsEnabled() written this way for
some reasons?
The widget.verbose setting worked correctly originally, but a committer
didn't understand its behavior and changed it:
http://ofbiz.135035.n4.nabble.com/Re-svn-commit-r961684-ofbiz-trunk-framework-widget-src-org-ofbiz-widget-ModelWidget-java-tt2282062.html#none
Now the setting is unusable.
Another issue is that these HTML boundary comments get outputted even
though the view handler is set to "screencsv". In the
widget-screen.xsd, the only way to invoke a template to produce CSV is
using <html><html-template />, but this always adds HTML
comments even if the output is CSV (see HtmlWidget class). Maybe we
could introduce a <csv> element or something like that?
If the widget.verbose code was put back to the way it was, then you
would be able to turn off the boundary comments when rendering csv.
Anyway, both of those problems combined mean that there are no
apparent clean ways to remove the HTML "template begin/end" boundary
comments from the CSV output if you try to draw it with an *.ftl
template. A workaround kludge for now is to invoke the FTL manually
through a Groovy script.
-Adrian