Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1580

decimalbox format and locale issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • 6.5.0
    • Components
    • None

      Reproducible Case

      The following code works in 6.0.2 but fails in 6.5.0. Originally reported on forum http://www.zkoss.org/forum/listComment/19974

      <decimalbox class="currency" width="200px" value="15000" locale="de" format="#,##0.00" ></decimalbox>
      

      Error Message

      The error message showed under 6.5.0 is:

          Malformed pattern "#,##0.00"
      Caused by:
      
      java.lang.IllegalArgumentException: Malformed pattern "#,##0.00"
      	at java.text.DecimalFormat.applyPattern(DecimalFormat.java:2561)
      	at java.text.DecimalFormat.applyLocalizedPattern(DecimalFormat.java:2283)
      	at org.zkoss.zul.impl.NumberInputElement.formatNumber(NumberInputElement.java:219)
      	at org.zkoss.zul.Decimalbox.coerceToString(Decimalbox.java:164)
      	at org.zkoss.zul.impl.InputElement.renderProperties(InputElement.java:838)
      	at org.zkoss.zul.impl.FormatInputElement.renderProperties(FormatInputElement.java:52)
      	at org.zkoss.zul.impl.NumberInputElement.renderProperties(NumberInputElement.java:172)
      	at org.zkoss.zul.Decimalbox.renderProperties(Decimalbox.java:174)
      	at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1805)
      	at org.zkoss.zk.ui.sys.HtmlPageRenders.outPageContent(HtmlPageRenders.java:609)
      	at org.zkoss.zul.impl.PageRenderer.renderDesktop(PageRenderer.java:98)
      	at org.zkoss.zul.impl.PageRenderer.render(PageRenderer.java:56)
      	at org.zkoss.zk.ui.impl.PageImpl.redraw(PageImpl.java:854)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:490)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:316)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
      	at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:135)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:326)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      

            noahhuang noahhuang
            hawk hawk
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: