dojo

Dojo require() and AMD (1.7)

ぐ巨炮叔叔 提交于 2019-12-03 10:34:38
问题 I'm having a heckuva time transitioning to Dojo and the new AMD structure, and I'm really hoping someone can shed some light on the whole concept. I've been living on Google for the last few weeks trying to find information on not the usage, but the structure and design pattern trends in using this. I find it strange that for a relatively complex javascript application, such as for a main page where Dijits need to be created and styled, DOM elements created, etc, that I need to require, and

Loading Dojo dijit CSS from CDN

社会主义新天地 提交于 2019-12-03 10:26:11
I am quite new to dojo world. Using dojo with google's CDN is well and Fine. But while using dijit just dojo.require() does not work. Where can I find the default CSS Themes from CDN ?? and another question out of quorisity: Would the the CSS configuration for dijit work for dojox too ?? Brian Arnold Sinclair The CSS can be found on Google's CDN. I've used it in a page or two. Here's some CSS link tags. <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/resources/dojo.css"> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax

Dojo: Get ID of inlineEditBox on OnChange

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using dojo and dijit and have an inlineEditBox widget. I'm trying to capture the onchange event and send a key/value post to a php page (to set into a database). The value is the new value just submitted, available from e.target.value. That's easy. I'd like the key value to be the id of the inlineEditBox widget. How can I access that programatically? 回答1: Since InlineEditBox is a widget it's best not to monitor DOM level events. Instead, why not connect to InlineEditBox.onChange? For example: <span dojoType="dijit.InlineEditBox" ...>

Dojo/Dijit setting invalid message and failing validation

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a form item with missingMessage and invalidMessage defined for the item. I call the form validation method on the item for validation. If the item is empty the missingMessage is called and the red exclamation mark error icon is shown. I am trying to set the invalidMessage on text item when the user enters a specific value how can i get the invalidMessage and the red exclamation mark to show without hard coding a constraint on the text item. I would like to use this for custom validation on items. If the user enters a particular value

dijit.byId(“”).is not defined in worklight works with angularjs

匿名 (未验证) 提交于 2019-12-03 09:10:12
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I make a project in worklight used dojo mobile 1.8.1 and angularjs 1.0.1,but i got a strange problem. here is my html part. <div data-dojo-type="dojox.mobile.ScrollableView" data-dojo-props="selected:true" id="id1" ></div> <div class="full" data-dojo-type="dojox.mobile.View" id="id2"></div> and my javascript part: require([ "dojo", "dijit/_base/manager","dojo/parser", "dijit/registry", ], function(dojo) { dojo.ready(function() { // dijit.byId("id1").performTransition("id2"); //////////place I }); }); var angularApp = angular.module('app', []

dijit.Tree search and refresh

放肆的年华 提交于 2019-12-03 09:04:57
I can't seem to figure out how to search in a dijit.Tree, using a ItemFileWriteStore and a TreeStoreModel. Everything is declarative, I am using Dojo 1.7.1, here is what I have so far : <input type="text" dojoType="dijit.form.TextBox" name="search_fruit" id="search_fruit" onclick="search_fruit();"> <!-- store --> <div data-dojo-id="fruitsStore" data-dojo-type="dojo.data.ItemFileWriteStore" clearOnClose="true" urlPreventCache="true" data-dojo-props='url:"fruits_store.php"'></div> <!-- model --> <div data-dojo-id="fruitsModel" data-dojo-type="dijit.tree.TreeStoreModel" data-dojo-props="store

Uncaught TypeError: Cannot read property &#039;on&#039; of undefined in arcgis

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i am trying to display navigation tool and switch base map.Individually both are working good when i combine it its showing Uncaught Type Error: Cannot read property 'on' of undefined.can any tell me what is the mistake <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title></title> <link rel="stylesheet" href="https://js.arcgis.com/3.15/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="https://js

Using dojo 1.8 in a packaged app (uncaught unload is not available in packaged apps)

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: After finally making some progress in using dojo with my packaged app, I've hit another road block that I can't find any documentation for. { ... "sandbox": { "pages": ["test.html"] }, "app": { "background": { "scripts": [ "background.js" ] } } } test.html loads dojo from the app as well as some of my modules, but as dojo parses the dom of the page, I get an error thrown by the platformApp Uncaught unload is not available in packaged apps. platformApp:14 (anonymous function) platformApp:14 Window.addEventListener platformApp:127 addListener

Dojo 1.7 how to use dojo components outside of require()

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have created Dojo widget like below using AMD loader in Dojo 1.7.2 var myCpane; require([ "dijit/layout/ContentPane" ], function(ContentPane) { myCpane = new ContentPane(); }); myCpane.startup(); // It gives 'myCpane' as undefined In the above example, in the last statment, the variable 'myCpane' is coming as 'undefined', if I use the 'myCpane.startup()' inside the 'require()' callback function then, it will work fine. But I want to use that 'myCpane' variable on outside of the 'require' function (for many reasons) . I know the 'require()'

How do I use uncompressed files in Dojo 1.7?

匿名 (未验证) 提交于 2019-12-03 08:56:10
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've created a Dojo module which depends on dojox/data/JsonRestStore like this: define("my/MyRestStore", ["dojo/_base/declare", "dojox/data/JsonRestStore"], function(declare, JsonRestStore) { var x = new JsonRestStore({ target: '/items', identifier: 'id' }); ... which is fine. But now I want to have the the uncompressed version of the JsonRestStore code loaded so that I can debug it. I can't find any documentation on how to do this, but since there is a file called 'JsonRestStore.js.uncompressed.js' I changed my code to: define("my