dojo

How do I create unique IDs in a Dojo widget template?

徘徊边缘 提交于 2020-01-10 18:20:07
问题 I have a Dojo widget that I'm writing that adds a label and an input box to the user's page. The for attribute of a label requires an HTML ID value, but a Dojo widget should not contain IDs in case multiple instances are created on the same page. So, does anyone have any suggestions on how to work around these conflicting needs? 回答1: Out the box, this is how the dijit registry sets WidgetID (this.id) if the configuration parameter is not present while constructing: constructor: function(args)

arcgis for js api离线部署

旧巷老猫 提交于 2020-01-08 17:41:23
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 例如3.11版本, api路径为:arcgis_js_api/library/3.11/3.11/ 一、普通js引用 (1)修改init.js ,搜索[HOSTNAME_AND_PATH_TO_JSAPI] 将baseUrl:中的值换成"./arcgis_js_api/library/3.11/3.11/dojo" 或者 将[HOSTNAME_AND_PATH_TO_JSAPI] 换成"IP/arcgis_js_api/library/3.11/3.11/" (2)修改dojo.js,搜索[HOSTNAME_AND_PATH_TO_JSAPI] 将baseUrl:中的值换成"./arcgis_js_api/library/3.11/3.11/dojo" 或者 将[HOSTNAME_AND_PATH_TO_JSAPI] 换成"IP/arcgis_js_api/library/3.11/3.11/" html中引用: <link rel="stylesheet" type="text/css" href="http://<myserver>/arcgis_js_api/library/3.11/3.11/dijit/themes/tundra/tundra.css"/> <link rel="stylesheet"

How to override dojo's domReady

我的梦境 提交于 2020-01-07 06:58:12
问题 I want to override dijit._CssStateMixin's domReady() method. Is there any way to override that instead of changing the listener mechanism in Dojo. I tried overriding _cssMouseEvent() method in simple javascript, but it still does invoke dijit's _cssMouseEvent() from domReady(). I have tried following approach: dojoConfig = { map: { 'dijit/_CssStateMixin': { 'dojo/domReady': 'app/noop' } } }; I have added 'app' folder and then 'noop.js' inside that. noop.js has nothing in it: define([],

How to force relative pathing with Struts 2.1 and Dojo?

自古美人都是妖i 提交于 2020-01-07 06:54:21
问题 I upgraded from Struts 2.0.6 to 2.1.6 and converted all my Ajax themes to plugins. Everything works except the pathing has changed from relative to absolute. For example, here is the rendered HTML before upgrade: <script type="text/javascript" src="../struts/simple/dojoRequire.js"></script> And here it is after upgrade: <script language="JavaScript" type="text/javascript" src="/myApp/struts/ajax/dojoRequire.js"></script> Somehow the absolute "/myApp" is getting used instead of the relative ".

dgrid custom sort issue

荒凉一梦 提交于 2020-01-07 02:50:07
问题 I'm trying to override the sort logic in dgrid as suggested by kfranqueiro in this link - https://github.com/SitePen/dgrid/issues/276. I get the data from the server in sorted order and just want to update the UI of column header. I'm doing this - On(mygrid, 'dgrid-sort', lang.hitch( this,function(event){ var sort = event.sort[0]; var order = this.sort.descending ? "descending" : "ascending"; console.log("Sort "+ this.sort.property + " in " +order+" order."); event.preventDefault(); mygrid

Cometd javascript client doesn't subscribe to broadcast channel

孤者浪人 提交于 2020-01-06 23:44:28
问题 It seems that the javascript client cannot subscribe to the broadcast channel or receive the message from it. Below is the spring-cometd service code that broadcast the message on the notification channel after receiving message from external event. The java-cometd client can receive the broadcast messages sucessfuly. Even the javascript client can publish and subscribe the messages on service channels but not on broadcast channel. The subscription is done after the handshake. JavaScript Code

Performing action a button click event, button being placed inside dojox.grid.DataGrid.

可紊 提交于 2020-01-06 20:24:39
问题 I have a dojox.grid.DataGrid . In this a set of values are being displayed along with last 2 columns being filled up with buttons which are created dynamically according to data being retrieved from database using formatter property in gridStruture . Now i am getting the my grid fine. Buttons are also coming up fine. What i need to do now is when i click on a particular button on that button click event i redirect it to a new URL with a particular value(A) being passes as a query string

Performing action a button click event, button being placed inside dojox.grid.DataGrid.

做~自己de王妃 提交于 2020-01-06 20:24:16
问题 I have a dojox.grid.DataGrid . In this a set of values are being displayed along with last 2 columns being filled up with buttons which are created dynamically according to data being retrieved from database using formatter property in gridStruture . Now i am getting the my grid fine. Buttons are also coming up fine. What i need to do now is when i click on a particular button on that button click event i redirect it to a new URL with a particular value(A) being passes as a query string

How can i enable use of background elements when the dialog is appeared?

六眼飞鱼酱① 提交于 2020-01-06 19:53:17
问题 I created a dojo dialog using the example . I work with maps in background. The problem is that when the dialog is appeared, the background is blocked and i can't use the map(the dialog with no underlaying). Is there any way to enable using background when the dialog is appeard on background? 回答1: You can do it with a little hack : require(["dijit/Dialog", "dijit/DialogUnderlay", "dojo/domReady!"], function(Dialog, DialogUnderlay){ //just for the snippets to get the right styling document

Why dojo.connect doesn't get fired after jQuery trigger?

*爱你&永不变心* 提交于 2020-01-06 18:37:17
问题 I have two system, one of them is using Dojo and the other one jQuery. I have to make some connection between them, but I'm experiencing a problem. jQuery eventlistener get fired after the jQuery trigger. Dojo event listener doesn't get fired. Why is that happen? I have created a minimal environment from my current problem: http://jsfiddle.net/vEkt6/ HTML: <input type="text" value="0" name="a" id="a" /> JS: var el = dojo.byId('a'); dojo.connect(el, 'change', function(){ console.log('dojo'); }