struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Wilmoth <jonwilm...@yahoo.com>
Subject [S2] datetimepicker fields can't be referenced/updated by ID?
Date Wed, 11 Apr 2007 18:43:28 GMT
I'm using Struts 2.0.7 & AjaxTags 1.2-beta3 and I've come to the painful realization that
AjaxTags no longer is able to update Struts2 datetimepicker fields.  The new S2 date fields
use a div (example html below) instead of an html form input tag.  The issue is that the "handler:
function(request, options)" part of AjaxJspTag.UpdateField in ajaxtags.js (also below) can't
change the value of the div object.  I'm posting this to the AjaxTags forum, but thought I'd
post here to see if struts 2.0.7 users had experience this issue (appears not to be specific
to the AjaxTags javascript) and had a workaround.

<div 
dojoType="dropdowndatepicker" id="selectedRangeEnd" value="2007-03-31T23:59:59" name="dojo.selectedRangeEnd"
inputName="selectedRangeEnd" displayFormat="MM/dd/yyyy" saveFormat="rfc"></div> 

AjaxTags expects form field not a div tag... 


  handler: function(request, options) {
    for (var i=0; i<options.targets.length && i<options.items.length; i++) {
      $(options.targets[i]).value = options.items[i][1];
    }
  }

Thanks,
Jon

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message