Monday, 15 June 2015

dojo - Spring.addElementDecoration for dijit.form.filteringselect fails in IE -



dojo - Spring.addElementDecoration for dijit.form.filteringselect fails in IE -

i using spring roo create page makes ajax phone call , populates section of page search form ajax call. done using standard roo tags , javascript libraries. form returned ajax simple, 1 select list.

<jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:field="urn:jsptagdir:/web-inf/tags/form/fields" xmlns:form="urn:jsptagdir:/web-inf/tags/form" xmlns:springform="http://www.springframework.org/tags/form" xmlns:jsp="http://java.sun.com/jsp/page" xmlns:spring="http://www.springframework.org/tags" version="2.0"> <div> <jsp:directive.page contenttype="text/html;charset=utf-8" /> <jsp:output omit-xml-declaration="yes" /> <form:search id="fc_domain_profile_combination" modelattribute="combination" path="/profiles/search/combinations" z="e2lxrqkkd2cs7zjefas2zxpw4xynm="> <field:select field="searchprocessingcenter" renderempty="true" disabled="true" id="c_profile_combofilter_processingcenter" items="${proccenters}" path="/profiles" itemlabel="name" itemvalue="id"/> </form:search> <input type="hidden" id="blocksubmithd" value="false" /> </div>

this code works fine in firefox , google chrome fails in ie "unknown error". problem happens in ajax method included in roo:

function callxhrget(contentid, ajaxurl){ var _targetnode = dojo.byid(contentid); var xhrargs = { url: ajaxurl, preventcache: true, handleas:"text", load: function(data) { dojo.html.set(_targetnode,data,{parsecontent:true}); dojo.foreach(dojo.query("script", _targetnode),function(node){ dojo.eval(node.innerhtml); }); dojo.parser.parse(_targetnode); }, error: function(error) { _targetnode.innerhtml = "an unexpected error occurred: " + error; } }; dojo.xhrget(xhrargs);

}

the dojo.eval(node.innerhtml); fails when tries process next line:

spring.adddecoration(new spring.elementdecoration({elementid : '_searchprocessingcenter_id', widgettype: 'dijit.form.filteringselect', widgetattrs : {hasdownarrow : true, required : false, invalidmessage: 'please come in valid role type' }}));

the interesting part when list empty works fine, other dijit.form.tags work fine well. advice , feedback how resolve issue?

spring dojo spring-roo

No comments:

Post a Comment