[
https://issues.apache.org/jira/browse/TAPESTRY-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494062
]
Ben Dotte commented on TAPESTRY-1388:
-------------------------------------
I can't reproduce this exact behavior given my example anymore either on the
Tapestry 4.1.2 snapshot from 5-7. However, I think it is still broken when you
provide your own translator. It works to type in the date on the timetracker
app with the default format (28 Mar 2007). Given the code example on this case,
if you type in the date in the format specified (03/28/2007) the date reverts
to 12/31/1969 as soon as you click Submit. It works properly and displays the
exact same value (03/28/2007) when you pick it from the picker and click Submit.
Maybe the translator issue should be on a separate case. We have switched all
our datepickers back to the regular Tapestry Datepicker component because of
this issue and several others we had with DropdownDatepicker so it isn't really
important to us that all these issues get worked out any longer.
> Date cannot be entered manually into DropdownDatePicker text field
> ------------------------------------------------------------------
>
> Key: TAPESTRY-1388
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1388
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.1.2
> Environment: Tapestry 4.1.2 snapshot from 3-21, OGNL 2.7 snapshot
> from 3-27, Firefox 2, WinXP
> Reporter: Ben Dotte
> Fix For: 4.1.2
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]