showcartitems.ftl: should desired delivery date use renderDateTimeField?

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

showcartitems.ftl: should desired delivery date use renderDateTimeField?

Paul Foxworthy
Hi all,

The line in showcartitems.ftl  that presents the desired delivery date doesn't use the renderDateTimeField macro, so won't be internationalised. See:

https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?hb=true#to140

Lines 199 and 205 do have the renderDateTimeField.

Is there a good reason for this? I'll submit a Jira issue and patch if not.

Cheers

Paul Foxworthy
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: showcartitems.ftl: should desired delivery date use renderDateTimeField?

Bilgin Ibryam-2
renderDateTimeField will render it as html input field, whereas
desired delivery date is only displayed, isn't it?

Bilgin

On Sun, Aug 7, 2011 at 8:51 AM, Paul Foxworthy <[hidden email]> wrote:

> Hi all,
>
> The line in showcartitems.ftl  that presents the desired delivery date
> doesn't use the renderDateTimeField macro, so won't be internationalised.
> See:
>
> https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?hb=true#to140
>
> Lines 199 and 205 do have the renderDateTimeField.
>
> Is there a good reason for this? I'll submit a Jira issue and patch if not.
>
> Cheers
>
> Paul Foxworthy
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/showcartitems-ftl-should-desired-delivery-date-use-renderDateTimeField-tp3724548p3724548.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: showcartitems.ftl: should desired delivery date use renderDateTimeField?

Paul Foxworthy
Yes, thanks Bilgin.

Input fields and the display widget use the locale for date formatting, but at least some Freemarker templates don't. It would be nice if they were consistent.

Cheers

Paul Foxworthy
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: showcartitems.ftl: should desired delivery date use renderDateTimeField?

Bilgin Ibryam-2
On Tue, Aug 9, 2011 at 1:54 AM, Paul Foxworthy <[hidden email]> wrote:
> Yes, thanks Bilgin.
>
> Input fields and the display widget use the locale for date formatting, but
> at least some Freemarker templates don't. It would be nice if they were
> consistent.
>

Can you give an example what you want to achieve?

The datetime_format for freemarker in ofbiz is set to yyyy-MM-dd
HH:mm:ss.SSS that's why it is rendered in this format for any locales.

If you want to display timestamps in a specific format containing i18n
part (for example the day/month printed in a specific language) you
can do it by explicitely setting the formatting in that ftl file like
this:

${cartLine.getDesiredDeliveryDate()?string("EEEE, MMMM dd, yyyy,
hh:mm:ss a '('zzz')'")}

HTH
Bilgin Ibryam

> Cheers
>
> Paul Foxworthy
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/showcartitems-ftl-should-desired-delivery-date-use-renderDateTimeField-tp3724548p3728726.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: showcartitems.ftl: should desired delivery date use renderDateTimeField?

Paul Foxworthy
Hi Bilgin,

I want consistency. If dates appear with some format because they are presented by the display widget or an input field, they should be in the same format when presented by a Freemarker template. I should not have to repeatedly express the date format I want in each Freemarker template.

Cheers

Paul Foxworthy

Bilgin Ibryam-2 wrote
On Tue, Aug 9, 2011 at 1:54 AM, Paul Foxworthy <[hidden email]> wrote:
> Yes, thanks Bilgin.
>
> Input fields and the display widget use the locale for date formatting, but
> at least some Freemarker templates don't. It would be nice if they were
> consistent.
>

Can you give an example what you want to achieve?

The datetime_format for freemarker in ofbiz is set to yyyy-MM-dd
HH:mm:ss.SSS that's why it is rendered in this format for any locales.

If you want to display timestamps in a specific format containing i18n
part (for example the day/month printed in a specific language) you
can do it by explicitely setting the formatting in that ftl file like
this:

${cartLine.getDesiredDeliveryDate()?string("EEEE, MMMM dd, yyyy,
hh:mm:ss a '('zzz')'")}

HTH
Bilgin Ibryam

> Cheers
>
> Paul Foxworthy
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/showcartitems-ftl-should-desired-delivery-date-use-renderDateTimeField-tp3724548p3728726.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: showcartitems.ftl: should desired delivery date use renderDateTimeField?

Adrian Crum-3
Paul,

This kind of request comes up with regularity, and I'm going the suggest
the same thing now that I have suggested before: Make the FreeMarker
date-time format configurable and supply a patch to Jira.

I believe it would be a simple matter of modifying FreeMarkerWorker.java
(line 93) to load the format from a properties file, or do nothing if
the property doesn't exist - which would cause FreeMarker to use the
user's locale for date-time formatting.

-Adrian


On 8/11/2011 1:17 PM, Paul Foxworthy wrote:

> Hi Bilgin,
>
> I want consistency. If dates appear with some format because they are
> presented by the display widget or an input field, they should be in the
> same format when presented by a Freemarker template. I should not have to
> repeatedly express the date format I want in each Freemarker template.
>
> Cheers
>
> Paul Foxworthy
>
>
> Bilgin Ibryam-2 wrote:
>> On Tue, Aug 9, 2011 at 1:54 AM, Paul Foxworthy&lt;[hidden email]&gt;
>> wrote:
>>> Yes, thanks Bilgin.
>>>
>>> Input fields and the display widget use the locale for date formatting,
>>> but
>>> at least some Freemarker templates don't. It would be nice if they were
>>> consistent.
>>>
>> Can you give an example what you want to achieve?
>>
>> The datetime_format for freemarker in ofbiz is set to yyyy-MM-dd
>> HH:mm:ss.SSS that's why it is rendered in this format for any locales.
>>
>> If you want to display timestamps in a specific format containing i18n
>> part (for example the day/month printed in a specific language) you
>> can do it by explicitely setting the formatting in that ftl file like
>> this:
>>
>> ${cartLine.getDesiredDeliveryDate()?string("EEEE, MMMM dd, yyyy,
>> hh:mm:ss a '('zzz')'")}
>>
>> HTH
>> Bilgin Ibryam
>>
>>> Cheers
>>>
>>> Paul Foxworthy
>>>
>>> --
>>> View this message in context:
>>> http://ofbiz.135035.n4.nabble.com/showcartitems-ftl-should-desired-delivery-date-use-renderDateTimeField-tp3724548p3728726.html
>>> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>>>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/showcartitems-ftl-should-desired-delivery-date-use-renderDateTimeField-tp3724548p3735685.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Training on OFBiz - Sorry for the SPAM

Venugopal S


Can  someone please let me who can provide us a good professional
training on OFBiz  for my team coming on site, To not to spam this
mailing list further, please  reply back to [hidden email]

Our Introduction
----------------------


We are a leading retailer with a chain of around 900 outlets in India
selling pharmacy products and providing clinical and pathology services.
We have our presence in apparels retailing as well. We are planing to
expand our business thru ecommerce with wide product range. To enable
our business we are looking at ERP solutions with e commerce as a
extended feature and have evaluated OFBIZ as one of the potential
candidates. We are looking at engaging consultancy and training in the
area of ERP and OFBiz in particular.
Reply | Threaded
Open this post in threaded view
|

Re: showcartitems.ftl: should desired delivery date use renderDateTimeField?

BJ Freeman
In reply to this post by Paul Foxworthy
Just some back ground
ofbiz used ftl then move to Widgets.
a lot of the FTL were wrapped in Widgets and still need to be converted
to widgets.
So the effort in FTL's should be only for those that can not be
converted to widgets.

Paul Foxworthy sent the following on 8/11/2011 5:17 AM:
> I want consistency.