From issues-return-13865-apmail-struts-issues-archive=struts.apache.org@struts.apache.org Mon Sep 21 15:37:13 2009 Return-Path: Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: (qmail 3885 invoked from network); 21 Sep 2009 15:37:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Sep 2009 15:37:13 -0000 Received: (qmail 93342 invoked by uid 500); 21 Sep 2009 15:37:13 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 93305 invoked by uid 500); 21 Sep 2009 15:37:13 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 93280 invoked by uid 99); 21 Sep 2009 15:37:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 15:37:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 15:37:09 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7A063234C1E7 for ; Mon, 21 Sep 2009 08:36:48 -0700 (PDT) Message-ID: <1127607790.1253547408494.JavaMail.jira@brutus> Date: Mon, 21 Sep 2009 08:36:48 -0700 (PDT) From: "Wes Wannemacher (JIRA)" To: issues@struts.apache.org Subject: [jira] Updated: (WW-3184) Type conversion & s:select In-Reply-To: <1755158881.1247512861129.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 2265bf7ad70cb93affdfde3e15287371 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/struts/browse/WW-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wes Wannemacher updated WW-3184: -------------------------------- Fix Version/s: 2.1.9 pushing to 2.1.9 > Type conversion & s:select > -------------------------- > > Key: WW-3184 > URL: https://issues.apache.org/struts/browse/WW-3184 > Project: Struts 2 > Issue Type: Bug > Components: Core Actions > Affects Versions: 2.1.6 > Environment: Struts 2.1.6 > Reporter: Denis Cabasson > Fix For: 2.1.9 > > Attachments: test-struts2-dates.zip > > > Hi, > So I'm trying to understand a little bit better the way type conversion is supposed to work in struts 2/Xwork 2 and I really don't get it. The part I am missing is when is that conversion applied, and on what basis? > My use case is an action that must present a select box containing dates. So hoping to have struts 2 do all the heavy lifting, I create my action with a field > private List theDates; > fills it with the right date and render it on the JSP : > > I have a field on my action to receive this date parameter : > private Date theDate; > The problem is that the generated HTML content is : > > What I don't get is that the body of the option has been correctly converted, while the value is not at all converted (that looks like a simple toString to me). So of course, the conversion from the toString version of the date to a date object is failing. > Now I don't get what I did wrong there, and how this is supposed to work. Definitely this looks wrong to me, cause the value is the most important thing in the option. But I couldn't find a way of getting that converted. > Any advise? > Thanks for any help. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.