Right, Dojo plugin is a strange beast ;-) Looks like you found a bug, please register an issue in JIRA. It works in Struts 2.3.15.3 but it's broken in 2.3.16 2014-04-07 12:36 GMT+02:00 Patrick Kelly : > If I include theme="dojo" on the sx:datetimepicker it throws an error > "Attribute theme invalid for tag datetimepicker according to tld" > > Patrick Kelly > > PatrickKelly > PrincipalConsultant > *River**Dynamics* > > E: patrick.kelly@riverdynamics.com > W: www.riverdynamics.com > > On 7/04/2014 7:47 PM, Lukasz Lenart wrote: >> >> Define theme in as it now inherits that from >> tag, >> >> >> >> 2014-04-07 11:42 GMT+02:00 Patrick Kelly >> : >>> >>> yes I have the sx:head tag - and no I can't see any javascript errors in >>> Firebug. >>> >>> Patrick Kelly >>> >>> PatrickKelly >>> PrincipalConsultant >>> *River**Dynamics* >>> >>> E: patrick.kelly@riverdynamics.com >>> >>> W: www.riverdynamics.com >>> >>> On 7/04/2014 7:05 PM, Lukasz Lenart wrote: >>>> >>>> Do you have tag in your jsp? Do you see any JavaScript >>>> errors? >>>> >>>> 2014-04-07 10:03 GMT+02:00 Patrick Kelly >>>> : >>>>> >>>>> 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('>>>> value="id"/>', '', >>>>> '', '>>>> value="serviceCode"/>', >>>>> '', >>>>> '>>>> value="units"/>', '', '>>>> value="gstApplies"/>', '');">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... >>>>> >>>>> >>>> method="post"> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> value="addItem"/> >>>>> >>>>> >>>>> >>>> displayFormat="%{getText('dateFormat')}" name="invoiceItem.createDate" >>>>> /> >>>>> >>>> name="invoiceItem.serviceCode" list="invoiceCodes"/> >>>>> >>>> name="invoiceItem.serviceDescription"/> >>>>> >>>> id="units" >>>>> size="4" name="invoiceItem.units"/> >>>>> >>>> id="cost" >>>>> size="6" name="invoiceItem.cost"/> >>>>> >>>> name="invoiceItem.gst"/> >>>>> >>>> readonly="true" >>>>> name="invoiceItem.total"/> >>>>> >>>> name="invoiceItem.gstApplies" id="gstApplies" >>>>> emptyOption="false" >>>>> list="#{'Yes':'Yes', 'No':'No'}"/> >>>>> >>>> name="invoiceItem.taxInclusive" id="taxInclusive" >>>>> emptyOption="false" >>>>> list="#{'No':'No', 'Yes':'Yes'}"/> >>>>>   >>>>> >>>> value="Save" >>>>> /> >>>>> >>>>> >>>>> >>>>> 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 >>>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >>>> For additional commands, e-mail: user-help@struts.apache.org >>>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >> For additional commands, e-mail: user-help@struts.apache.org >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org