widgetVerbose

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

widgetVerbose

Jacques Le Roux
Administrator
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?

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?

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.

Thanks

Jacques


Reply | Threaded
Open this post in threaded view
|

Re: widgetVerbose

David E. Jones-2

There was an old thread about this with a few complaints, but it looks like it stands.

Maybe more discussion and/or a commit war is in order? ;)

-David


On Aug 30, 2011, at 9:15 PM, 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?
>
> 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?
>
> 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.
>
> Thanks
>
> Jacques
>
>

Reply | Threaded
Open this post in threaded view
|

Re: widgetVerbose

Scott Gray-2
It's strange actually, I thought I had silently fixed this a few months ago.  The precedence should be: context -> web.xml -> widget.properties

Jacques, have you tried using the screencsv view handler for the csv problem?

Regards
Scott

On 31/08/2011, at 6:34 PM, David E Jones wrote:

>
> There was an old thread about this with a few complaints, but it looks like it stands.
>
> Maybe more discussion and/or a commit war is in order? ;)
>
> -David
>
>
> On Aug 30, 2011, at 9:15 PM, 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?
>>
>> 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?
>>
>> 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.
>>
>> Thanks
>>
>> Jacques
>>
>>
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: widgetVerbose

Adrian Crum-3
In reply to this post by Jacques Le Roux
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

Reply | Threaded
Open this post in threaded view
|

Re: widgetVerbose

Scott Gray-2
In reply to this post by Scott Gray-2
On 31/08/2011, at 8:02 PM, Scott Gray wrote:

> It's strange actually, I thought I had silently fixed this a few months ago.  The precedence should be: context -> web.xml -> widget.properties
>
> Jacques, have you tried using the screencsv view handler for the csv problem?

Sorry, just noticed you answered this in your original email.

> Regards
> Scott
>
> On 31/08/2011, at 6:34 PM, David E Jones wrote:
>
>>
>> There was an old thread about this with a few complaints, but it looks like it stands.
>>
>> Maybe more discussion and/or a commit war is in order? ;)
>>
>> -David
>>
>>
>> On Aug 30, 2011, at 9:15 PM, 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?
>>>
>>> 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?
>>>
>>> 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.
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>>
>>
>


smime.p7s (3K) Download Attachment