Tapestry
  1. Tapestry
  2. TAPESTRY-1388

Date cannot be entered manually into DropdownDatePicker text field

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.7
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Tapestry 4.1.2 snapshot from 3-21, OGNL 2.7 snapshot from 3-27, Firefox 2, WinXP

      Description

      If a date is selected from the dropdown picker and the form is submitted, the date gets set on the page property correctly. If the date is entered manually by the user, the page property remains null. Here is an example test page:

      <shell jwcid="@Shell" title="DateTest">
      <body jwcid="@Body">
      <form jwcid="@Form" success="listener:submitPicker">
      <picker jwcid="@DropdownDatePicker" value="ognl:theDate" translator="ognl:dateTranslator"/>
      <submit jwcid="@Submit" />
      </form>
      </body>
      </shell>

      public abstract class DateTest extends BasePage
      {
      public abstract Date getTheDate();

      @Bean(value = org.apache.tapestry.form.translator.DateTranslator.class, initializer = "pattern = MM/dd/yyyy")
      public abstract Translator getDateTranslator();

      public void submitPicker()

      { System.out.println("date: " + getTheDate()); }

      }

      If I pick the date 03/28/2007 from the picker I get this output on form submit:
      date: Wed Mar 28 00:00:00 CDT 2007

      If I manually enter 03/28/2007 the form submits with no validation errors but the output I get is:
      date: null

      The text field also clears itself right as I click to submit the form when I manually enter a date.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Ben Dotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development