Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-1248

DatePickerTag single click not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • WW 2.2.1
    • WW 2.2.2
    • Plugin - Tags
    • None
    • Any

    Description

      From the forum: http://forums.opensymphony.com/thread.jspa?threadID=22588&tstart=0

      Hi

      I have comitted DatePickerTagTest that has a test for the singleClick boolean field.
      tag.setSingleClick("true");

      Will result in a Freemarker template engine error.

      22:58:44,609 ERROR [freemarker.runtime]
      Error on line 21, column 31 in template/simple/datepicker.ftl
      Expecting a string, date or number here, Expression parameters.singleclick is instead a freemarker.ext.beans.BooleanModel
      The problematic instruction:
      ----------
      ==> ${parameters.singleclick} [on line 21, column 29 in template/simple/datepicker.ftl]
      in include "/${parameters.templateDir}/simple/datepicker.ftl" [on line 2, column 1 in template/xhtml/datepicker.ftl]
      ----------

      Java backtrace for programmers:
      ----------
      freemarker.core.NonStringException: Error on line 21, column 31 in template/simple/datepicker.ftl
      Expecting a string, date or number here, Expression parameters.singleclick is instead a freemarker.ext.beans.BooleanModel
      at freemarker.core.Expression.getStringValue(Expression.java:126)
      at freemarker.core.Expression.getStringValue(Expression.java:93)
      at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
      at freemarker.core.Environment.visit(Environment.java:196)
      at freemarker.core.MixedContent.accept(MixedContent.java:92)
      at freemarker.core.Environment.visit(Environment.java:196)
      at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
      at freemarker.core.Environment.visit(Environment.java:196)
      at freemarker.core.MixedContent.accept(MixedContent.java:92)
      at freemarker.core.Environment.visit(Environment.java:196)
      at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
      at freemarker.core.Environment.visit(Environment.java:196)
      at freemarker.core.MixedContent.accept(MixedContent.java:92)
      at freemarker.core.Environment.visit(Environment.java:196)
      at freemarker.core.Environment.include(Environment.java:1375)
      at freemarker.core.Include.accept(Include.java:155)
      at freemarker.core.Environment.visit(Environment.java:196)
      at freemarker.core.MixedContent.accept(MixedContent.java:92)
      at freemarker.core.Environment.visit(Environment.java:196)
      at freemarker.core.Environment.process(Environment.java:176)
      at freemarker.template.Template.process(Template.java:231)
      at com.opensymphony.webwork.components.template.FreemarkerTemplateEngine.renderTem plate(FreemarkerTemplateEngine.java:124)
      at com.opensymphony.webwork.components.UIBean.mergeTemplate(UIBean.java:630)
      at com.opensymphony.webwork.components.UIBean.end(UIBean.java:584)
      at com.opensymphony.webwork.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSup port.java:21)
      at com.opensymphony.webwork.views.jsp.ui.DatePickerTagTest.testSingleclick(DatePic kerTagTest.java:53)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at junit.textui.TestRunner.doRun(TestRunner.java:116)
      at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:58)
      at junit.textui.TestRunner.start(TestRunner.java:172)
      at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRun ner2.java:23)
      at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStart er.java:98)
      at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

      Attachments

        Activity

          People

            rgielen René Gielen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: