Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 73A0B11F5E for ; Mon, 7 Apr 2014 08:03:45 +0000 (UTC) Received: (qmail 7007 invoked by uid 500); 7 Apr 2014 08:03:43 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 6387 invoked by uid 500); 7 Apr 2014 08:03:42 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 6379 invoked by uid 99); 7 Apr 2014 08:03:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2014 08:03:41 +0000 X-ASF-Spam-Status: No, hits=3.8 required=5.0 tests=HTML_MESSAGE,HTTP_ESCAPED_HOST,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [150.101.137.143] (HELO ipmail05.adl6.internode.on.net) (150.101.137.143) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2014 08:03:36 +0000 Received: from ppp59-167-130-22.static.internode.on.net (HELO [192.168.1.9]) ([59.167.130.22]) by ipmail05.adl6.internode.on.net with ESMTP; 07 Apr 2014 17:33:11 +0930 Message-ID: <53425BB8.5080300@riverdynamics.com> Date: Mon, 07 Apr 2014 18:03:04 +1000 From: Patrick Kelly User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: user@struts.apache.org Subject: datetimepicker used in conjunction with theme=simple form Content-Type: multipart/alternative; boundary="------------040809080807010909020000" X-Virus-Checked: Checked by ClamAV on apache.org --------------040809080807010909020000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I am head butting a virtual brick wall trying to get the datetimepicker dojo widget to work with a theme=simple form. I am in the middle of upgrading a webwork app to struts2 2.3.15.3. The good news is that datetimepicker works just like I would expect it in hundreds of places across the migrated application but only if the form is theme=xhtml. However if the form is simple (which it is in this case), then what used to work "auto magically" in webwork seems a little more troublesome in struts 2. There is some critical step I am missing but am yet to figure it out. This is what I am doing. The page uses an iterator to populate a list (of invoice items under an invoice) and then allows the user to edit any item in the list by clicking an "Edit" link that appears for each item in the list. The cell for the "Edit" link looks like: href="javascript:editInvoiceItem('', '', '', '', '', '', '', '', '');">Edit And the javascript editInvoiceItem that gets called looks like: function editInvoiceItem(id, provider, createDate, serviceCode, serviceDescription, units, cost, gstApplies, taxInclusive) { document.getElementById("invItemId").value = id; document.getElementById("provider").value = provider; document.getElementById("createDate").value = createDate; document.getElementById("code").value = serviceCode; document.getElementById("desc").value = serviceDescription; document.getElementById("units").value = units; document.getElementById("cost").value = cost; document.getElementById("gstApplies").value = gstApplies; document.getElementById("taxInclusive").value = taxInclusive; units=units.replace(/\$|\,/g,''); cost=cost.replace(/\$|\,/g,''); calculateLineItem(); } And the theme=simple form that is auto populated when the user clicks "Edit" looks like...   There are 2 problems: - the field "createDate" is not populated when the user clicks the "Edit" link (while all the other non-date fields referenced in the javascript are) - and if I manually enter a new date via the datetimepicker widget and click a button to save the updated invoice item data, then I get a validation error saying the "createDate" field is missing So it looks like there is some extra getter/setter logic that is required for a datetimepicker in theme=simple mode that is needed for any of the other non-date fields and wasn't needed in webwork (probably because it used a different date widget). Here's hoping someone can point me in the right direction. Regards - Patrick -- Patrick Kelly PatrickKelly PrincipalConsultant *River**Dynamics* E: patrick.kelly@riverdynamics.com W: www.riverdynamics.com --------------040809080807010909020000--