Discussion:
Jahia dateField problem
Lorenzo Patocchi
2008-06-23 21:19:01 UTC
Permalink
Hello,
we have upgraded from jahia 4.1.1 to jahia 4.2 build 19618 and noticed
a serious problem handing dateField

the tag:

<content:dateField name="fromDate" defaultValue="" diffActive="true"
display="false" valueId="fromDate" />

generated unusable output with 00 on month, i.e.: *16.00.2008 02:06*
Current workaround is:

org.jahia.data.beans.ContainerBean container =
(org.jahia.data.beans.ContainerBean)pageContext.getAttribute("newsContainer");
fDate = new
Date(Long.parseLong((String)container.getFieldObject("fromDate")));

but would be fine to have it working as 4.1 version.

but also editor is get affected by this bug.



Another problem is the reset date, actually not working.
Thank you for support.
--
Lorenzo Patocchi
Dipl. Ing. STS/ETS/HTL
***@cryms.com - www.cryms.com
Tel: +41 91 60 55266
Cel: +41 79 375 0891
Fax: +41 91 223 9797

Cryms sagl
Via Vedeggio 1
Uovo di Manno
6928 Manno - Lugano
Switzerland
Sergiy Shyrkov
2008-06-24 06:59:48 UTC
Permalink
_______________________________________________
template_list mailing list
***@jahia.org
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list
Lorenzo Patocchi
2008-06-24 13:01:17 UTC
Permalink
Thank You Sergiy,
for the precoius help. Effectively I never noticed the upper/lower
detail and changed successfully

from

String jahiaDateFormatPattern = "<jahia_calendar[dd.mm.yyyy HH:MM]>";

to

String jahiaDateFormatPattern = "<jahia_calendar[dd.*MM*.yyyy HH:*mm*]>";

where:

<content:declareField name="fromDate"
title="From Date"
titleKey="fromDate"
type="Date"
value='<%=jahiaDateFormatPattern%>'
/>

I would strongly advice Jahia staff to include this into migration Notes:

http://www.jahia.net/download/jahia4/4_2/patch/README_4_2_1.html

Thanks a Lot !

Lorenzo P
Hello Lorenzo,
starting with Jahia 4.2 the date format strictly adheres to the Java's
date format pattern
(http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html)
dd.mm.yyy HH:MM
to
dd.MM.yyyy HH:mm
Please note the correct case of the pattern characters.
After these changes, check that your JSP templates get recompiled
properly: you will need to delete the already compiled JSP or/and
comment out or delete the corresponding servlet-mapping in the web.xml
file, in order to force the recompilation.
Kind regards
Sergiy
Post by Lorenzo Patocchi
Hello,
we have upgraded from jahia 4.1.1 to jahia 4.2 build 19618 and
noticed a serious problem handing dateField
<content:dateField name="fromDate" defaultValue="" diffActive="true"
display="false" valueId="fromDate" />
generated unusable output with 00 on month, i.e.: *16.00.2008 02:06*
org.jahia.data.beans.ContainerBean container =
(org.jahia.data.beans.ContainerBean)pageContext.getAttribute("newsContainer");
fDate = new
Date(Long.parseLong((String)container.getFieldObject("fromDate")));
but would be fine to have it working as 4.1 version.
but also editor is get affected by this bug.
Another problem is the reset date, actually not working.
Thank you for support.
--
Lorenzo Patocchi
Dipl. Ing. STS/ETS/HTL
Tel: +41 91 60 55266
Cel: +41 79 375 0891
Fax: +41 91 223 9797
Cryms sagl
Via Vedeggio 1
Uovo di Manno
6928 Manno - Lugano
Switzerland
------------------------------------------------------------------------
_______________________________________________
template_list mailing list
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list
------------------------------------------------------------------------
_______________________________________________
template_list mailing list
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list
--
Lorenzo Patocchi
Dipl. Ing. STS/ETS/HTL
Tel: +41 91 60 55266
Cel: +41 79 375 0891
Fax: +41 91 223 9797

Cryms sagl
Via Vedeggio 1
Uovo di Manno
6928 Manno - Lugano
Switzerland
Loading...