encode-output="false" for display type="currency"

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

encode-output="false" for display type="currency"

Jacques Le Roux
Administrator
In revision: 747364, I had to introduce encode-output="false" for display type="currency" in ListInventoryAverageCosts form. Let me explain quickly why.

In France (for instance) we use now space as thousands separator
So I had to not encode output. But there are 75 occurrences of <<display type="currency">> in OFBiz forms.

So my question, should we not rather change something at ModelFormField.java[763] ?

Thanks

Jacques
Reply | Threaded
Open this post in threaded view
|

Re: encode-output="false" for display type="currency"

Jacques Le Roux
Administrator
Afterthought : I think I was not clear enough

By default encode-output is true for display fields. If the type is currency an amount like 1260 will be rendered as US$1,260.00 in
USA but should be rendered 1 260,00 $ in France.

So with encoding an &nbsp; is introduced in place of the space. And finally it's not rendered as 1&nbsp;260,00 $ but as 1,00 $ which
is ... false!

So I want to generalise (without using encode-output="false") and introduce a specific change for that at ModelFormField.java[763].
Without any comments I will do it tomorrow

Jacques

From: "Jacques Le Roux" <[hidden email]>
In revision: 747364, I had to introduce encode-output="false" for display type="currency" in ListInventoryAverageCosts form. Let me
explain quickly why.

In France (for instance) we use now space as thousands separator
So I had to not encode output. But there are 75 occurrences of <<display type="currency">> in OFBiz forms.

So my question, should we not rather change something at ModelFormField.java[763] ?

Thanks

Jacques


Reply | Threaded
Open this post in threaded view
|

Re: encode-output="false" for display type="currency"

Jacques Le Roux
Administrator
Fixed in at revision: 748803

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Afterthought : I think I was not clear enough
>
> By default encode-output is true for display fields. If the type is currency an amount like 1260 will be rendered as US$1,260.00
> in USA but should be rendered 1 260,00 $ in France.
>
> So with encoding an &nbsp; is introduced in place of the space. And finally it's not rendered as 1&nbsp;260,00 $ but as 1,00 $
> which is ... false!
>
> So I want to generalise (without using encode-output="false") and introduce a specific change for that at
> ModelFormField.java[763]. Without any comments I will do it tomorrow
>
> Jacques
>
> From: "Jacques Le Roux" <[hidden email]>
> In revision: 747364, I had to introduce encode-output="false" for display type="currency" in ListInventoryAverageCosts form. Let
> me explain quickly why.
>
> In France (for instance) we use now space as thousands separator
> So I had to not encode output. But there are 75 occurrences of <<display type="currency">> in OFBiz forms.
>
> So my question, should we not rather change something at ModelFormField.java[763] ?
>
> Thanks
>
> Jacques
>