Hi ,
Dojo's queryExpr: "*${0}*" seem to be not function in org.springframework.js-2.0.8.RELEASE.jar.
header,
inputbox,Code:<head> <link type="text/css" rel="stylesheet" href="<c:url value="/resources/dijit/themes/tundra/tundra.css" />" /> <script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />"></script> <script type="text/javascript" src="<c:url value="/resources/spring/Spring.js" />"></script> <script type="text/javascript" src="<c:url value="/resources/spring/Spring-Dojo.js" />"></script> </head>
json,Code:... <form:input path="txns[0].account" /> <script type="text/javascript"> dojo.require("dojo.data.ItemFileReadStore"); var stateStore = new dojo.data.ItemFileReadStore({ url: "<c:url value='/js/accounts.json' />"}); Spring.addDecoration(new Spring.ElementDecoration({ elementId : "txns0.account", widgetType : "dijit.form.ComboBox", widgetAttrs : { store: stateStore, searchAttr: "desc", queryExpr: "*${0}*", style: "width: 300px;", highlightMatch: "all", autoComplete: "false", hasDownArrow: "false", value: "-" }})); </script> ...
l can display the "desc" list , but it alway choose the first oneCode:{ identifier:"id", label:"desc", items:[ { desc:"1000 - Capital", id:1}, { desc:"3000 - Bank MBB", id:2}, { desc:"7000 - Expenses", id:3} ] }
ps. this function did work in the link below ( item : "No arrow, data store which searches and highlights matches anywhere in the string"),
http://download.dojotoolkit.org/rele...tering Select
moon


Reply With Quote