Uploaded image for project: 'Click'
  1. Click
  2. CLK-489

Table sorting throws exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.1, 1.5 M1
    • 2.1.0, 2.1.0 RC1, 1.5.2
    • core
    • None
    • Windows XP - Sun JVM 1.6.0_11-b03 - Apache Tomcat/6.0.16

    Description

      If you have a TABLE (net.sf.click.control.Table) with a COLUMN (net.sf.click.control.Column) that's sortable. And the column contains a value of type java.lang.String such as this (without quotes): "113L - 7 - 105".

      When you click on the column label to sort on that column you get the following exception:

      java.lang.NumberFormatException: For input string: "113L"
      at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
      at java.lang.Double.valueOf(Double.java:475)
      at net.sf.click.control.Column$ColumnComparator.numericCompare(Column.java:1575)
      at net.sf.click.control.Column$ColumnComparator.stringCompare(Column.java:1537)
      at net.sf.click.control.Column$ColumnComparator.compare(Column.java:1484)
      at java.util.Arrays.mergeSort(Arrays.java:1270)
      at java.util.Arrays.mergeSort(Arrays.java:1281)
      at java.util.Arrays.mergeSort(Arrays.java:1281)
      at java.util.Arrays.mergeSort(Arrays.java:1281)
      at java.util.Arrays.mergeSort(Arrays.java:1281)
      at java.util.Arrays.mergeSort(Arrays.java:1281)
      at java.util.Arrays.sort(Arrays.java:1210)
      at java.util.Collections.sort(Collections.java:159)
      at net.sf.click.control.Table.sortRowList(Table.java:1727)
      at net.sf.click.control.Table.render(Table.java:1255)
      at net.sf.click.extras.control.FormTable.render(FormTable.java:494)
      at net.sf.click.control.AbstractControl.toString(AbstractControl.java:808)
      at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:336)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      at org.apache.velocity.runtime.directive.Parse.render(Parse.java:224)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
      at org.apache.velocity.Template.merge(Template.java:254)
      at net.sf.click.service.VelocityTemplateService.renderTemplate(VelocityTemplateService.java:314)
      at net.sf.click.ClickServlet.renderTemplate(ClickServlet.java:702)
      at net.sf.click.ClickServlet.processPage(ClickServlet.java:661)
      at net.sf.click.ClickServlet.handleRequest(ClickServlet.java:331)
      at net.sf.click.ClickServlet.doGet(ClickServlet.java:250)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)

      If you need further information, please feel free to contact me. I would appreciate it if someone could help me fix this exception.

      Venkatt

      Attachments

        Activity

          People

            sabob Bob Schellink
            vguhesan Venkatt Guhesan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: