Dynamic Extjs DateFields in the dynamic form
I am very much thankful to this stackoverflow,as i am getting required help very quickly here.
I am facing a problem in ExtJs.(with java spring backend combination). I am having a jsp file like this.
<c:when test="${eformDetails.controlType=='date'}">
<span id="eform_date_${eformDetails.id}"></span>
</c:when>
And in the js file i am trying to create date objects like this.But not working :-(
$.each('span[id^=["eform_date_"]',function(){new Ext.form.DateField({renderTo:this.id,name: 'form_0',id :'date_'+this.id,width: 140});});
My Requirement is if th开发者_高级运维e eformDetails.controlType
is date then i have to display a date field there.
Could please help me in this.
I am very much thankful to you guys..
Thanks in advance -Sathya
The selector you're looking for is probably:
$.each('span[id^=eform_date_]', function() { /* DateField */ });
The unmatched bracket is a syntax error. You can test it in your browser's console to make sure you're getting it right.
精彩评论