Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2011

Global overrides for date format / number format

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 5.3.3
    • None
    • tapestry-core

    Description

      It's currently not easy to override the locale specific date / number formats provided by the JRE. It's also not easy to set a global default for date / number formats (eg in beaneditor or beandisplay). For example, the default edit date format is DateFormat.SHORT whereas the default display format is DateFormat.MEDIUM.

      It would be nice if tapestry had overridable services for providing these, eg:

      public interface DateFormatProvider {
      DateFormat getDefaultDisplayDateFormat();
      DateFormat getDefaultEditDateFormat();
      DateFormatSymbols getDateFormatSymbols();
      }

      public interface NumberFormatProvider {
      <T> NumberFormat getDefaultDisplayNumberFormat(Class<T extends Number> type);
      <T> NumberFormat getDefaultEditNumberFormat(Class<T extends Number> type);
      DecimalFormatSymbols getDecimalFormatSymbols();
      }

      Related issues:
      http://tapestry.1045711.n5.nabble.com/Global-setting-for-date-format-td5716054.html
      http://tapestry.1045711.n5.nabble.com/tapestry-js-formatLocalizedNumber-td5716714.html

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            uklance Lance S
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment