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

Table column rendering fails when column name is an Ognl and part of the expression is null (not the end one).

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      I suggest returning an empty String when Ognl evaluation fails. This is not an application error because it's quite reasonable to have an optional field that you want to display in a table.

      Stack Trace:

      [Click] [error] handleException: java.lang.RuntimeException: ognl.OgnlException: source is null for getProperty(null, "departmentName")
      at net.sf.click.control.Column.getProperty(Column.java:1015)
      at net.sf.click.control.Column.renderTableDataContent(Column.java:931)
      at net.sf.click.control.Column.renderTableData(Column.java:882)
      at net.sf.click.control.Table.renderBodyRowColumns(Table.java:996)
      at net.sf.click.control.Table.renderBodyRows(Table.java:971)
      at net.sf.click.control.Table.toString(Table.java:859)
      at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:270)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:235)
      at org.apache.velocity.runtime.directive.Parse.render(Parse.java:211)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:117)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:235)
      at org.apache.velocity.Template.merge(Template.java:254)
      at net.sf.click.ClickServlet.renderTemplate(ClickServlet.java:584)
      at net.sf.click.ClickServlet.processPage(ClickServlet.java:523)
      at net.sf.click.ClickServlet.handleRequest(ClickServlet.java:345)
      at net.sf.click.ClickServlet.doPost(ClickServlet.java:290)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at net.sf.click.extras.filter.CompressionFilter.doFilter(CompressionFilter.java:209)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at net.sf.click.extras.cayenne.DataContextFilter.doFilter(DataContextFilter.java:125)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:514)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: ognl.OgnlException: source is null for getProperty(null, "departmentName")
      at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1611)
      at ognl.ASTProperty.getValueBody(ASTProperty.java:96)
      at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
      at ognl.SimpleNode.getValue(SimpleNode.java:210)
      at ognl.ASTChain.getValueBody(ASTChain.java:109)
      at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
      at ognl.SimpleNode.getValue(SimpleNode.java:210)
      at ognl.Ognl.getValue(Ognl.java:333)
      at ognl.Ognl.getValue(Ognl.java:378)
      at ognl.Ognl.getValue(Ognl.java:357)
      at net.sf.click.control.Column.getProperty(Column.java:1012)

        Activity

        Hide
        medgar Malcolm Edgar added a comment -

        Fix checked into SVN will be available in 1.1 release.

        Show
        medgar Malcolm Edgar added a comment - Fix checked into SVN will be available in 1.1 release.

          People

          • Assignee:
            medgar Malcolm Edgar
            Reporter:
            dfrizelle David Frizelle
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development