Localized date format for end user
---------------------------------- Key: OFBIZ-3843 URL: https://issues.apache.org/jira/browse/OFBIZ-3843 Project: OFBiz Issue Type: Improvement Components: framework Affects Versions: SVN trunk Reporter: Nicolas Malin Priority: Minor Many French end users don't want to use this date format : yyyy-mm-dd. To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. What's working : * Dates in screen engine : display, date-find, date-time * performFind * Service call Know problem : * I don't find how to configure js calendar to support this functionality It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Malin updated OFBIZ-3843: --------------------------------- Attachment: date-localized.patch To test, apply patch and try to create and search an example with french date format dd/mm/yyyy > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885138#action_12885138 ] Nicolas Malin commented on OFBIZ-3843: -------------------------------------- Is there a luck to have an opinion on the patch? I know that this topic don't interested necessarily the English but it's still a starting point for OFBiz date internationalization. Tks by advance ;) Nicolas > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885152#action_12885152 ] Jacques Le Roux commented on OFBIZ-3843: ---------------------------------------- Hi Nicolas, I will try to review, but maybe not this week nor the next, should be before end of July if nobody beats it on it Thanks! > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885157#action_12885157 ] Nicolas Malin commented on OFBIZ-3843: -------------------------------------- Tks a lot Jacques. I create an addon to wait your review, I need to this functionnality for customer. Nicolas > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885160#action_12885160 ] Jacques Le Roux commented on OFBIZ-3843: ---------------------------------------- Sorry for the surplus of work Nicolas, actually I will take an holidays week from Thursday this week :) > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891122#action_12891122 ] patrick LE BLAN commented on OFBIZ-3843: ---------------------------------------- I have tried the patch unsuccessful: On FindServices.java could not find to make change but recompiled application and restarted no change : I recompiled trough command java -jar ofbiz.jar -install -readers=seed,seed-initial FindServices.java could not find to make change below text -215,6 +219,7 @@ Set<String> processed = FastSet.newInstance(); Set<String> keys = FastSet.newInstance(); Map<String, ModelField> fieldMap = FastMap.newInstance(); + Map<String, Object> convertValue = FastMap.newInstance(); for (ModelField modelField : fieldList) { fieldMap.put(modelField.getName(), modelField); } @@ -253,6 +258,15 @@ if (parameters.containsKey(fieldName)) { keys.add(fieldName); } + if (UtilValidate.isNotEmpty(fieldValue) && useDateLocalized) { + try { + Timestamp toConvert = (Timestamp) ObjectType.simpleTypeConvert(fieldValue, "Timestamp", (String)null, (Locale) context.get("locale")); + fieldValue = toConvert.toString(); + convertValue.put(fieldName.concat("_value"), fieldValue); + } catch (GeneralException e) { + Debug.logError("Parse date " + fieldName + " with value " + fieldValue + " failed", module); + } + } fieldName = fieldName.substring(0, fieldName.length() - 5); } if (parameters.containsKey(fieldName)) { @@ -271,7 +285,8 @@ } result.add(createSingleCondition(modelField, operation, fieldValue, ignoreCase, delegator, context)); for (String mapKey : keys) { - queryStringMap.put(mapKey, parameters.get(mapKey)); + if (convertValue.containsKey(mapKey)) queryStringMap.put(mapKey, convertValue.get(mapKey)); + else queryStringMap.put(mapKey, parameters.get(mapKey)); } } return result; @@ -292,6 +307,7 @@ EntityCondition cond = null; String fieldName = modelField.getName(); EntityComparisonOperator<?, ?> fieldOp = null; + Locale locale = (Locale) context.get("locale"); if (operation != null) { if (operation.equals("contains")) { fieldOp = EntityOperator.LIKE; @@ -311,13 +327,13 @@ fieldOp = EntityOperator.LESS_THAN; } else if (operation.equals("greaterThanFromDayStart")) { String timeStampString = (String) fieldValue; - Object startValue = modelField.getModelEntity().convertFieldValue(modelField, dayStart(timeStampString, 0), delegator, context); + Object startValue = modelField.getModelEntity().convertFieldValue(modelField, dayStart(timeStampString, 0, locale), delegator, context); return EntityCondition.makeCondition(fieldName, EntityOperator.GREATER_THAN_EQUAL_TO, startValue); } else if (operation.equals("sameDay")) { String timeStampString = (String) fieldValue; - Object startValue = modelField.getModelEntity().convertFieldValue(modelField, dayStart(timeStampString, 0), delegator, context); + Object startValue = modelField.getModelEntity().convertFieldValue(modelField, dayStart(timeStampString, 0, locale), delegator, context); EntityCondition startCond = EntityCondition.makeCondition(fieldName, EntityOperator.GREATER_THAN_EQUAL_TO, startValue); - Object endValue = modelField.getModelEntity().convertFieldValue(modelField, dayStart(timeStampString, 1), delegator, context); + Object endValue = modelField.getModelEntity().convertFieldValue(modelField, dayStart(timeStampString, 1, locale), delegator, context); EntityCondition endCond = EntityCondition.makeCondition(fieldName, EntityOperator.LESS_THAN, endValue); return EntityCondition.makeCondition(startCond, endCond); } else { @@ -618,17 +634,17 @@ return results; } - private static String dayStart(String timeStampString, int daysLater) { + private static String dayStart(String timeStampString, int daysLater, Locale locale) { String retValue = null; Timestamp ts = null; Timestamp startTs = null; try { - ts = Timestamp.valueOf(timeStampString); - } catch (IllegalArgumentException e) { + ts = (Timestamp) ObjectType.simpleTypeConvert(timeStampString, "Timestamp", (String)null, locale); + } catch (GeneralException e) { timeStampString += " 00:00:00.000"; try { - ts = Timestamp.valueOf(timeStampString); - } catch (IllegalArgumentException e2) { + ts = (Timestamp) ObjectType.simpleTypeConvert(timeStampString, "Timestamp", (String)null, locale); + } catch (GeneralException e2) { return retValue; } } > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891172#action_12891172 ] Nicolas Malin commented on OFBIZ-3843: -------------------------------------- Hi Patrick I reapply this path on OFBiz trunk with succes. I run : ant I go to example component and create an example with date 20/07/2010. After than I search this example by the exampleDate. All works for me. I understand your patch (isn't really esay to read on comments) Nicolas > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-3843: ----------------------------------- Attachment: Without patch (in trunk demo).jpg > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-3843: ----------------------------------- Attachment: With the patch.jpg > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891975#action_12891975 ] Jacques Le Roux commented on OFBIZ-3843: ---------------------------------------- Patrick, Tip: use { code} around you code to make it legible (I put a white space before the code word to make it appears Nicolas, I applied the patch. There are some problems: # see attached screenshots # you should not put these values as default properties in general.properties (what if someone needs another format?) > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891975#action_12891975 ] Jacques Le Roux edited comment on OFBIZ-3843 at 7/24/10 8:48 AM: ----------------------------------------------------------------- Patrick, Tip: use { code} around you code to make it legible (I put a white space before the code word to make it appears Note: you can even Edit your comment (you are the sole person to be able to) Nicolas, I applied the patch. There are some problems: # see attached screenshots # you should not put these values as default properties in general.properties (what if someone needs another format?) was (Author: jacques.le.roux): Patrick, Tip: use { code} around you code to make it legible (I put a white space before the code word to make it appears Nicolas, I applied the patch. There are some problems: # see attached screenshots # you should not put these values as default properties in general.properties (what if someone needs another format?) > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891977#action_12891977 ] Jacques Le Roux commented on OFBIZ-3843: ---------------------------------------- Patrick, Actually in such case it's even better to attach a patch, without granting right to ASF to make clear that it's not intended to be commited Thanks > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891989#action_12891989 ] Adrian Crum commented on OFBIZ-3843: ------------------------------------ A few comments about this issue: 1. The current date-time format is not a US format, it is the JDBC escape format supported by the Timestamp class. The date-time format was chosen as a defacto "standard" format for consistency - so no matter what locale the user has selected, date-time data entry will always be the same. 2. The date-time format issue has been brought up enough times that it is clear we need to provide a means to override the JDBC escape format. Whatever method is used to accomplish that, we still need to support those who prefer to use the JDBC escape format. 3. I haven't applied this patch - I only looked through it, but I can see some serious problems: A. The format override is a setting in a properties file - the user-selected locale is ignored. B. The date-time popup calendar has not been updated to support the format override. 4. The implementation is not a good design. I would suggest changing the UtilDateTime methods that reference the static format fields so that a flag is checked that indicates whether to use the user's locale or the JDBC escape format, and then use the appropriate format. > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892000#action_12892000 ] Nicolas Malin commented on OFBIZ-3843: -------------------------------------- @Jacques : Oh I haven't the same result. I check why ? @Adrian : 1. Yes I know the date format system ;) 2. It's the reason that we can use a properties to force format. But it's not a user preference. 3. A. In the best world, the date time localized work's with the user locale but I prefere in first draft use a propertie to have a useable system. In Neogia I realized date-time localized, but it's really hard to manage it. B. Yes, I don't found how do that. It's the reason that I said "I don't find how to configure js calendar to support this functionality" ;) 4. I reanalyse with your suggest. Tks all for the review :) > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892004#action_12892004 ] Jacques Le Roux commented on OFBIZ-3843: ---------------------------------------- Nicolas, Yes please... > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897332#action_12897332 ] Nicolas Malin commented on OFBIZ-3843: -------------------------------------- Jacques I found the problem, not the solution :( When date-time is rendered, the value is find in context by function ModelFormField.getEntry() at line 674. In this function, tha value pass to an encoder : if (this.getEncodeOutput() && returnValue != null) { StringUtil.SimpleEncoder simpleEncoder = (StringUtil.SimpleEncoder) context.get("simpleEncoder"); if (simpleEncoder != null) { returnValue = simpleEncoder.encode(returnValue); } } Before encode : 11/08/2010 15:54:28 After encode : 11/08/2010 15:54:28 In function MacroRenderedField.renderDateTimeField (line491) this value is trunked by a maxsize but with encoding system, the result is wrong => 11/08/2010 15&# convert by navigator to 11/08/2100 15 &# I don't understand why encoder is present in ModelFormField. A solution is force ModelFormField.encodeOuput to false for DateTimeField, DateFindField I submit a new path asap. Nicolas > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-3843: ----------------------------------- Attachment: Wrong From Date.jpg > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg, Wrong From Date.jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897357#action_12897357 ] Jacques Le Roux commented on OFBIZ-3843: ---------------------------------------- Hi Nicolas, I don't see any differences between Before and After. Is that a C/P error, or are some special characters hidden by Jira? In last case use { code } or { quote } to keep them (I put white spaces around code and quote, else they would not show). This is an interesting issue to me, because I think I have something related in a custom application based on trunk, see Wrong From Date screenshot (no custom code handling the From Date, only OOTB OFBiz widgets) Thanks > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg, Wrong From Date.jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897591#action_12897591 ] Nicolas Malin commented on OFBIZ-3843: -------------------------------------- Sorry jacques, I WILL submit a new path asap. I don't found a good solution :( but I works on it Nicolas > Localized date format for end user > ---------------------------------- > > Key: OFBIZ-3843 > URL: https://issues.apache.org/jira/browse/OFBIZ-3843 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Nicolas Malin > Priority: Minor > Attachments: date-localized.patch, With the patch.jpg, Without patch (in trunk demo).jpg, Wrong From Date.jpg > > > Many French end users don't want to use this date format : yyyy-mm-dd. > To make a better user friendly OFBiz interface, I've added the possibility to configure in general.properties a localized date format. OFBiz use localized format (as dd/mm/yyyy) for all interactions with users but keep universal format for its framework. It's then possible to set date with unniversal or localized format. > What's working : > * Dates in screen engine : display, date-find, date-time > * performFind > * Service call > Know problem : > * I don't find how to configure js calendar to support this functionality > It's possible that my solution isn't the best one to do that. But I'm open to all comment -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |