FAQ Database Discussion Community


How to add an item to the JsonRestStore local storage?

javascript,dojo
I'm using tree with dijit.tree.ForestStoreModel as a model and JsonRestStore as a store. It works fine when tree is initialised. After that I want to add another item to the store manually (not from server) to update the tree. My question is how can I do it without posting the...

dgrid in a custom widget

javascript,html,dojo,dgrid
I have a custom widget to which I pass data from backend. Grid shown on the correct place but not showing data on it. I tried with hardcoded data but only the headers are shown. Grid has height and width set. Here is the code snippet. I would appreciate any...

dgrid 'Object doesn't support this action; when attempting to render columns

dojo,dgrid
I'm trying to render a grid using dgrid. When I try it throws an error when trying to create the columns. I've followed the example exactly so I can't figure out what's wrong. Any help is appreciated. require(["dojo", "dojo/dom", "dojo/_base/array", "dijit/registry", "dojo/store/Memory", "dgrid/Grid", "dojo/domReady!"], function (array, Grid, dom, dojo, registry,...

dojox.layout.TableContainer using div instead of table element

dojo
I'm creating a table container programmatically as described here. But I see that it is not using a table element as described in the documentation. Instead it is using a div. So the children flow if the parent is resized. The labels don't show up either. This is how it...

dojo.exists fails with IE11

javascript,dojo,xpages,internet-explorer-11,lotus-domino
Since a few days, I have troubles with Internet Explorer 11 in conjunction with dojo toolkit 1.9.4 hosted by a Domino Server. Source Code: if (dojo.exists("btnUpload")) { console.log("btnUpload exist ... do something..."); } else { console.log("btnUpload doesn't exist..."); } With IE11 the return value of dojo.exists() is always false! IE11...

Should there by a [dojo] hitch in my giddy-up?

javascript,dojo,scope,this
I'm using working on some custom Dojo widgets but keep feeling like I'm the proverbial contortionist that scratches their ear by reaching twice around their head. For some reason my use of dojo.hitch() doesn't feel right. Here's what works: myObject = { one: function() { promise = new Deferred(); promise.then(dojo.hitch(this,...

color dgrid cell based on cell value

javascript,css,dojo,dgrid
I've got a dgrid and I'm trying to set the cell background color based on the value of the cell using a formatter function and css. The dgrid is located within a div with ID UnMarkedTicketGridDiv formatter function: formatPriority: function (item) { return = "<td class='" + item + "'>"...

Why is Dojo build generating all it's dependencies next to the released dojo.js file?

javascript,dojo,requirejs
All I want is a bundled version of dojo with is the require loader, domReady, and query and nothing else. I have tried many release.profiles and experimented changing the config. I tried these too: http://dojotoolkit.org/reference-guide/1.8/build/customBase.html http://jamesthom.as/blog/2012/08/03/finding-nano/ This and many other examples generate the whole folder of dojo and all its...

dojo-amd-factory-scan:false seems not to work

dojo,xpages,lotus-notes
I try to load an external JavaScript library like jQuery mobile to my IBM Notes Database. When i add this library i run i to the known amd loader problem. I found an article that says when i add xsp.client.script.dojo.djConfig="dojo-amd-factory-scan": false to the xps.properties, this will fix this problem but...

Looping through array until value is found and then breaking

javascript,arrays,dojo,dijit.form
I have a select field which on change I get the value. As I am looping through the select values I want to detect if it matches the value I have if it does I also want to check if the object contains a flag===true I wrote in. All I...

Why onClick event not work on dojo MenuItem?

dojo,onclick,menuitem
I'm studying Dojo 1.10.4, my problem is that the onClick event does not work on dijit/MenuItem. I tried it on other item widgets like dijit/CheckedMenuItem and dijit/RadioMenuItem, none of their click events work, and the API docs didn't give any tips about it. At last, I found it only works...

How to call custom js function on scroll in Dojo OnDemandGrid?

javascript,dojo,grid
We are using dojo OnDemandGrid. I need to call a js method when I scroll down and more records are loaded in the Grid. This is what I have tried so far. aspect.after(grid,"dgrid-refresh-complete",function(){ }); grid.on("dgrid-refresh-complete", function(event){ }); ...

ArcGIS API for JavaScript map is always 400px by 400px

c#,asp.net-mvc-4,dojo,arcgis,arcgis-js-api
In my project, I am using ArcGIS API for JavaScript https://developers.arcgis.com/javascript/ but for the (insert really big bad word here) I can't override this stupid width/height. No matter what I do, it just does not change, the map comes out to be 400px by 400px. I tried to Google it...

Dgrid and Django Rest Framework (JsonRest)

python,django,dojo,dgrid,jsonreststore
I am creating an ondemand grid using dojo's dgrid. I am having trouble connecting to the store. I can get the column headers to display but I can't get any data to display here is the code I'm using. Some data changed for confidentiality. Any assistance would be greatly appreciated....

Transform String to array using DOJO-AJAX

javascript,ajax,json,dojo,cors
I am having an issue, I am receiving from an external API that I don't have control a JSON message like below: "{"searchResults":[{"resultNumber":1,"distance":0.06,"sourceName":"mqap.ntpois","name":"Chef Chen's...

Prevent backspace button from navigating back to previous XPage

jquery,dojo,xpages,lotus-domino
In my XPages application, I have noticed that whenever I hit the backspace key (without an input field having focus), the application returns to the previous XPage. How can I disable this behavior? I believe this is possible with JQuery and / or Dojo but am unsure how to add...

Dojo Mobile Scrollableview : How to animate and scroll to top?

dojo,dojox.mobile
require(["dojox/mobile/parser", "dijit/registry", "dojo/domReady!"], function(parser, registry) { var view = registry.byId("myId"); view.scrollTo({x:0 ,y: 0}); }); The above piece of code scrolls to the top. But there is no animation. Any suggestion how to animate and scroll to top?...

Custom widget with widgetlist and data-dojo-attach-event on children

javascript,model-view-controller,dojo
I have a custom widget with a WidgetList inside it. I need to call a function in my custom widget when checkboxes in the WidgetList are checked but it seems I'm out of it's scope here; I'm in the scope of each list item: lang.hitch: scope["topCheck"] is null (scope="[Widget dojox.mvc.Templated,...

dijit tree checkbox select all the child when parent clicked

checkbox,dojo,tree
I have created check box adjacent to each node of the tree using _createTreeNode. The fiddle link given below: http://jsfiddle.net/pyz9Lcpv/8/ Now my requirement is below: 1. get all the treenode name when "try it" button clicked. I am trying this using publish and subscribe. Pushing the the treenode name in...

understanding Dojo closure example

javascript,dojo,closures
In the Dojo docs there is an example: require([ "dojo/query", "dojo/_base/array", "dojo/dom-construct", "dojo/domReady!" ], function(query, array, domConst){ function topLinks(){ var headings = query('h2,h3'); array.forEach(headings, function(elm){ var topLink = domConst.create("a", { href: "#top", innerHTML: "^top" }); domConst.place(topLink, elm, "before"); }); } }); I assume that function(elm) is a closure with 'elm'...

DGRID - give numeric value for multiple Characters in field

javascript,dojo,dgrid
I'm still rather new to Dgrid, Dojo, Javascript - really all of it. In a dgrid cell - there is a value '----------------!!!-' Or variations of the same format. There might be 1 exclamation point or multiple - and in multiple combinations. I need to get the count of each...

Typeahead's items don't appear

dojo,bootstrap-typeahead
I'm integrating dojo-bootstrap's typeahead (https://github.com/xsokev/Dojo-Bootstrap) into my dojo project (inside a dijit widget) and even debugging and seeing the filtered list in typeahead.js line 136 (this.menuNode.innerHTML = items.join('');) the typeahead's items list don't show anything. No errors on console. Any tips?...

Dojo - variable assignment occurs too late in xhrPut

javascript,dojo,dojo-1.7
I have the following: if(typeof searchDOM === "undefined"){ dojo.xhrPut({ url: addrPath + "/ContServlet?mod=1&act=23", handleAs: "xml", timeout: xhrTimeout(TIMEOUT_LRG), load: function(dom, ioArgs){ if(dom instanceof Error){ console.error(dom); } else{ cacheDOM = dom; } }, error: function(response, ioArgs){ xhrError(ioArgs, methodName); } }); } The variable cacheDOM is a global variable declared(but not initialised) elsewhere...

Dojo InlineEditBox wouldn't initialize

javascript,dojo
Trying to use InlineEditBox as it is described in the tutorial. The code hasn't been changed: require(["dijit/InlineEditBox", "dijit/form/Textarea", "dojo/domReady!"], function(InlineEditBox, Textarea){ var eb = new InlineEditBox({ editor: Textarea, autoSave: false }, "ieb").startup(); }); For some reason, I've got an error: TypeError: Cannot read property 'on' of null Running debugger show...

Use dojox.validate on Dijit ValidationTextBox, but not make text required

javascript,dojo,dijit.form
In my Dijit form, I have the following ValidationTextBox: <input data-dojo-type="dijit/form/ValidationTextBox" name="email" data-dojo-props="required: true, validator:dojox.validate.isEmailAddress, invalidMessage: 'Invalid email'" /> However, I would like to make the field not required (i.e. allow it to be empty), but still use the dojox.validate method. Removing required: true or explicitly setting required: false doesn't...

dgrid 0.4.0 tree looks flat before user interacts

dojo,tree,dgrid,dstore
Trying to use dgrid 0.4.0 to display a tree structure. (no prior experience with previous versions 0.3.x). I built this sample with two folders : alice and bob ; each would have a few files (leaves) in it. The store ("astore.js") define(['dojo/_base/declare', './dstore/Memory', './dstore/Tree'], function(declare, Memory, Tree) { var store...

How to disable the button if some input field is not filled?

dojo,ibm
IBM web experience factory uses dojo library, I am wondering if the I set <input type="text" name="usrname" required> in the consumer model, does the button still work if the input is not filled?

Custom Error XPage: Ability for Browser to Load and Execute JS Script Link or Block After Being Loaded On Error

javascript,dojo,xpages,xpages-ssjs
Situation I'm using a custom error XPage, based highly off of the XSnippet from Tony McGuckin. It works rather well but I would like for the browser to execute a client-side JavaScript block (or load and run a JS file from a given URL). If I navigate directly to the...

Integrating Dojo with Django

javascript,django,dojo
I am creating a web app. Want to use django to handle backend - the data - and put Dojo on the front end for the interface. I new to a lot of this... and can't seem to find a straight-forward tutorial on HOW to integrate the two. For starters:...

adding popup submenu items to the submenu

javascript,jsp,menu,dojo
I want to create popup submenu items for the submenu. Please find the fiddle: http://jsfiddle.net/nw9tU/353/. I have a menubar and on click of it, it shows the submenu items, when i mouse over on Save submenu item, it has to popup other 2 submenu items as Save ALL and Save...

how to make dijit vertical toolbar with dojo programatically or declaratively

dojo
using dijit/Toolbar always renders horizontal toolbars. I need it to be vertical. <div id="toolbar1" data-dojo-type="dijit/Toolbar" ><div data-dojo-type="dijit/form/Button" id="toolbar1.cut" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconCut', showLabel:false">Cut</div ><div data-dojo-type="dijit/form/Button" id="toolbar1.copy" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconCopy', showLabel:false">Copy</div ><div data-dojo-type="dijit/form/Button" id="toolbar1.paste"...

Dojo grid refresh and scroll position

javascript,dojo,dgrid
I have a Grid in Dojo, var myGrid = new (declare([Grid, DijitRegistry]))({ store: myStore, // this is a Observable(Memory()) columns:[ {field: "field1", label: "A", sortable: false}, {field: "field2", label: "B", sortable: false}, {field: "field3", label: "C", sortable: false}, {field: "field4", label: "D", sortable: false}, {field: "field5", label: "E", sortable: false}...

How to call xhr in Dojo using TypeScript

dojo,typescript
I'm using Typescript (new to it), and Dojo, and I need to make an async call. This is pretty easy when you're not using TypeScript. But, the compiler is making things harder, especially because I do not allow "implicit any". I also like the lambda-style callbacks, but the compiler complained...

How do I capture the `id` of my child/nested (sub) tabs of my dojo TabContainer?

javascript,dojo,dijit.layout
I have a set of tabs with child tabs. I need to get the id of each tab when it is clicked. I first found the watch function built into the dojo TabContainer object: myTabContainer.watch("selectedChildWidget", function(name, oval, nval){ console.log("selected child changed from ", oval, " to ", nval); }); This...

DOJO Build how to create a layer?

javascript,dojo,dojo-build
I have the following profile for a DOJO custom build (boilerplate from https://github.com/csnover/dojo-boilerplate). I need to create a layer for my custom code with result as a single .js file for my custom code. At the moment the code take all files for custom, and process theme (minification) but the...

Intern Async Test

javascript,node.js,dojo,intern
I am trying to get an async intern test working using a separate module to do the request call. I am having an issue returning true once the test is done because I always get a timeout error, even though the request is successful, and the test runs to completion....

Column values not changed after edit the coulmn in GRIDX

dojo,dojox.grid.datagrid,dojox.grid,dojox.charting,dojo.gridx
Am using Dojo Gridx in my project. These are my columns names id, field1, field2, active status I have a assignment, when click column active status need to change the active status value, column icon and field1, field2 values. For example : if active status values is 'Y' when I...

Complex JSON structure + Dojo Selects

javascript,json,select,dojo
I have a data structure and i don't know how to manage it properly. I must use Dojo, so i chose JSON to solve this problem. The structure i'm talking about is on the bottom of this post. Go check it before you read the following text. The problem: i...

Create and access DOM element in javascript (Dojo)

javascript,html,dojo
My javascript creates the HTML statically (Bad practice, I know! But legacy code, can't help it). I need to create a div and access it somehow to append something to it in dojo (JavaScript Library). How do I do that? if (someCondition) { html += "<span style=" " class='someClassName'></span>" }...

Custom Validation on HTML Number Input Misbehaving

javascript,html,dojo,cross-browser
In putting together a small webapp, I'm trying to ensure that end users are unable to place invalid characters in a number field that can hold signed floats. I'm using Dojo to search on an applied CSS class (in this case, ogInputNumber) and set events on input, keyup, and blur....

parser.js not found on Google CDN for dojo 1.10.3

javascript,ajax,dojo,cdn,google-cdn
I am using Google CDN in order to get DOJO. This the code I am using in my website. <script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.3/dojo/dojo.js"></script> When calling in my code module 'dojo/parser' like this define([ 'dojo/topic', 'dojo/parser', 'dijit/registry' ], function (topic, parser) { var instance; function Test() { } Test.prototype = { init: function...

Clicking on button using unique button label

java,selenium,selenium-webdriver,dojo
I want to click on a button which has a label "Declaration": <div class="LNTitleOuter"> <div class="LNTitleInner" data-dojo-attach-point="navigationOptionTitle_pt">Declaration</div> </div> When I used the Selenium IDE to capture the click, then paste as Java code it returns: driver.findElement(By.cssSelector("div.LNTitleOuter")).click(); Unfortunately, this is not unique. The only unique element is the description "Declaration". How...

label name and background color for dropdownButton

css,dojo
I want to display the label name on bottom of the image, Currently label is displayed on the right hand side of the image on DropDownButton. Another requirement is i have to remove the background color of the dropdown button, it should be seen as plain image but not button...

dojo FilteringSelect takes time to autocomplete, any hack to autocomplete it faster?

javascript,autocomplete,dojo
Good Folks, I'm using dojo FilteringSelect to populate list of numbers on UI from database. I have observed that if I tab out immediately after keying in a valid value in the text box (valid = value is present in drop down list), text box turns red indicating that there's...

Dojo 1.10 Create one .js file with all modules needed

dojo
I've been reading a lot about the new features in Dojo (after 1.6)... is it possible to build one .js file that contains not only the dojo.js file, but also all the modules (and their dependencies) required for the page? Thanks....

Dojo infinite bounce animation

javascript,css3,dojo
I need to make this css3 animation using Dojo, but I'm not getting the desired result. The arrow should bounce when its hovered. Simiilar to this http://codepen.io/dodozhang21/pen/siKtp but horizontal. HTML: <a href="#" class="uiAnimatedArrow" title="Buying a Home"> <!-- --> <span> <i data-copy="Learn More"><b></b></i> Buying a Home </span> </a> CSS: a.uiAnimatedArrow i...

Dojo dijit/ConfirmDialog

javascript,dojo
How can i disable the Ok button on dijit/ConfirmDialog? var lasloLoginFormDialog = new ConfirmDialog({ title: "Login", closable: false, }); https://jsfiddle.net/Jason96/mqyyp20u/4/...

dijit tree not able to get child from collapase tree

tree,dojo,children
My dojo tree is very huge. I need to expand one node at time to increase the performance. My tree have check box. When one check a parent node , I need to know all the child of the parent , also the sub child till the leaf of the...

I can't find an elegant way to add a Database Source to a dgrid

javascript,dojo,grid,dgrid
For now I have require([ "dojo/on", "dgrid/OnDemandGrid","dgrid/Tree","dgrid/Editor", "dgrid/Keyboard", "dojo/_base/declare", "dgrid/data/createHierarchicalStore", "data/projects_data", "dojo/domReady!" ], function( on, Grid, Tree, Editor, Keyboard, declare, createHierarchicalStore, hierarchicalCountryData ){ var count = 0; // for incrementing edits from button under 1st grid function nbspFormatter(value){ // returns "&nbsp;" for blank content, to prevent cell collapsing return value...

dojo dgrid with store from url (json data) reload/refresh button

javascript,dojo,store,dgrid,dstore
Firstly, I'm using dojo 1.1.0 and dgrid 0.4.0. I'm creating a page with a few dgrids on it. One grid in particular needs to load JSON data from a url and display it. It currently works fine doing that with a RequestMemory store. however, this is a "memory" store. while...

Is it possible to insert a menu item at a specific position in Dijit using Dijit/Menu

javascript,drop-down-menu,dojo
I have a menu whose contents need to change significantly based on user interaction. This means that some new menu items need to be introduced, and some need to be removed. Looking at Dojo's published API documentation, there doesn't seem to be a way to redo a menu's contents without...

labelType not working on dijit/forms/select

drop-down-menu,dojo,dijit.form
adding an option to the dijit/forms/select, which is like this, "<nav asdasd>" Since dijit/forms/select, uses labelType = "html" by default, I am setting the labelType to 'text' but even then the option is added as an HTML element. HTML <select id="select1" data-dojo-type="dijit/form/Select" data-dojo-props="labelType:'text'" style="width:150px;"></select> Javascript (Dojo) require([ "dojo/ready", "dojo/_base/lang", "dijit/registry"],...

Content-Range configuration for Django Rest Pagination

dojo,pagination,django-rest-framework,http-content-range
I need to send a content-range header to a dojo/dgrid request: I cannot find any examples of HOW to do this. I'm not exactly sure where this setting goes (Content-Range: items 0-9/*). I have been given a great linkheaderpagination example on this question: Django Rest Framework Pagination Settings - Content-Range...

Best way to handle multi-valued fields as a view/grid

dojo,xpages
In several notes applications, instead of handling related data as separate documents, if the size of the data is small (less than the 32k limit), I'll make several multi valued fields and display it in what I call a "List Panel". It's a table where each column displays one multi-value...

dojo xhrPost progress (callback) event listener?

javascript,ajax,dojo
In the dojo API documentation I can find callbacks for load and error but I am missing a callback for progress. load: function(data) { dojo.byId("response").innerHTML = "Form posted."; }, error: function(error) { dojo.byId("response").innerHTML = "Error..."; } The XMLHttpRequest API provides the possibility, to register event listeners for the progress event:...

dijit/form/DateTextBox not correctly parsed

javascript,date,dojo
What can be the reason of a dijit/form/DateTextBox not correctly parsed ? Here is the scenario : I have a page where a following control is correctly rendered : Then the user can be redirecter to another page, and we store the date he selected on the current page. When...

How to call an event when the dojo dgrid has been rendered completely?

dojo,dgrid
We are using dojo without pagination and showing all records at once. We need to call a java script method when the entire grid has been rendered completely, so that the grid rows and cell can be used for DOM manipulation. I am trying following code, but its not working....

Performing a PUT update in dojo using GitHub api returns 400: problems parsing JSON

javascript,json,github,dojo,github-api
Basically I am trying to update a file on Github using the api. When I do this in Poster it works no problem and I get a response from the server. When sending the exact same params in an xhr put request however, I receive a 400: Bad request error...

Display Dojo Tabs broken in XPages

javascript,dojo,xpages
We use the Dojo Tab Control. We fill this out with a HashMap, the title and the content. Now we want to hide and unhide the tabs with a button. If the control has been loaded before, does the presentation. If the control was hidden from the beginning, the control...

Use Dojo boxConstrainedMoveable to constrain movable div to window

dojo
I have a div, to which I applied Dojo dojo/dnd/Moveable. But, I'd like to prevent the user from dragging the div offscreen. So, I think I need to implement dojo/dnd/move/boxConstrainedMoveable. I'm starting with this: var dnd = new Moveable(this.domNode, { 'handle': this.titleNode }); There's a similar SO question here: Constrain...

Dgrid - Firefox breaks while trying to load large data set in dgrid

javascript,firefox,dojo,dgrid,broken-pipe
I have a dgrid connected to a store with a very large data set. (Currently over 137,000 rows). I expect there to be a delay. When I first connected the store - the data populated the dgrid. However I keep getting a pipe break now. I didn't change anything between...

dstore ( dojo ) event (add) misfiring on collection

javascript,dojo,dstore
dojo version : 1.10.0 dstore version : 1.1.0 Steps that were followed. 1) Created a memory store using the dstore memory ( employeeStore ). 2) Created a collection salesEmployee by applying the filter.i,e employeeStore.filter({department:'sales'}); 3) Added the add event listener on the salesEmployee collection. 4) Added a new employee to...

How to make Typescript Dojo Widget Newable?

javascript,dojo,typescript
From within an existing Dojo widget, I want to create an instance of some other widget, which has been transpiled from TypeScript. Sounds simple -- but for some reason the transpiled widget is not "newable", unless I specify the classname twice. I can't update all of that existing code, so...

rowclick event to modify dropdown value in dojo grid

javascript,html,drop-down-menu,dojo
My requirement is when i click on any row in the enhanced grid, the value in the dropdown menu should change, like when i click on row1, 1st option in the dropdown should be shown, when i click on row2 , 2nd option should show in the dropdown as soon...

How to save a json file locally with dojo toolkit

javascript,android,json,eclipse,dojo
I'm trying to create a JSON file with dojo toolkit that need to be saved into local memory of the phone. The app need to be valid for android and IOS. I'm using ECLIPSE with ADT as a IDE. My principal issue is that normally the file created with dojo...

Getting Dojo widgets like dojox.layout.ContentPane working for Android apps developed using Cordova with NetBeans

javascript,android,cordova,netbeans,dojo
I'm trying to get widgets like dojox.layout.ContentPane working properly in a Netbeans Cordova environment for Android and iOS. I'm using as the main contentPane that will render the pages based on what the user press. Is it possible to get it working or are there better alternatives in Dojo for...

Dojo fallbacks for IE9

javascript,css3,dojo
I need some help with Dojo. The website that I'm working on is build using Dojo. I need to make a fallback for css3 transitions/animations in IE9. It is required to use Dojo not jQuery. So, how can I implement a fallback using Dojo? This is the css3 property that...

dojo 1.10 How to read text file a user has picked with a file picker

javascript,file-io,dojo
Using Dojo 1.10 (for consistency with existing GUI), I want the user to select a local JSON text file via a file picker, then read the file's contents into a JavaScript variable. Must work in IE9+. A RESTful server is available if required, but not mandatory. I had some limited...

How to use built/compressed Dojo to resolve Dojo modules ref'ed from tests?

dojo,intern
Currently, with my Intern setup, I'm using an unbuilt Dojo build when running my Intern tests; like, for example, a test module loads app/ProductModuleA, and ProductModuleA references and loads dojo/request. I need to have the dojo/request.js file in the appropriate directory structure in order for the module to be resolved...

Struts2 Ajax validation won't work

javascript,jquery,ajax,struts2,dojo
I decided to use Struts 2 DOJO plugin for the ajax validation of my forms. I have: Added Struts2 dojo and json plugin to project Added 'jsonValidationWorkflowStack' intercepter to my actions Included dojo taglib and <sx:head /> tag on my page Included <sx:submit validate="true" /> in my form Now, after...

var that = this VS dojo.hitch()

javascript,dojo
Is it better to use var that = this; var that = this; array.forEach( tabPages, function ( tabPage, index ) { that.layerTabPageClose(tabPage.id, true); ... }); or to use lang.hitch() instead array.forEach( tabPages, lang.hitch( this, function ( tabPage, index ) { this.layerTabPageClose(tabPage.id, true); ... })); Which one is better and why?...

Calling a function from outside of require which is written inside of require in dojo

javascript,html,asynchronous,dojo
<html> <head> <script> require(["dojo/ready"],function(ready){ function init(dataItem) { alert("inside init method") updateData(dataItem); } function updateData(dataItem){ //inside this function, i am creating some breadcrumb and making each part of it a link. //Now that link is calling another method outerFunction() } ready(function(){ init({ type: "All Locations", id: "All_Locations" }); }); }); function...

Can I setup my dojo dijit form ComboButton to do a onClick or something similar when the user selects a value in the drop down list?

javascript,combobox,dojo,dijit.form
I think I may be using the wrong dojo widget. I just need a dropdown list really, but currently have setup a ComboButton. Can I setup an onClick or onSelect of some sort when the user picks an option inside the ComboButton down down menu? My current onClick is picking...

dojo.require not loading in recursive order

javascript,dojo,cross-domain
I'm trying to move some of my dojo 1.7 codebase online. I've enabled CORS on the server, and local/online files are loaded with dojo.require. While this worked fine for local files, http files would fail to load in recursive order. For example, dojo.registermodulepath("my.path", "http://my.path"); dojo.require(my.path.module1); dojo.require(my.path.module2); Now, assuming the module1...

How to change the color of PlaceHolder in dijit/form/TextBox?

html,dojo
Im trying to assign the value to a placeHolder in dijit/form/textbox. I have used it in declarative Way... <input id="searchbox" name="searchbox" value="" data-dojo-type="dijit/form/TextBox" style="width: 9em; height: 1.4em;font-size:14px" onKeyPress="sboxOnClick"> document.getElementById("searchbox").placeholder="<font color='grey' style='font-weight:bold'>search</font>"; But I'm getting the value as, <font color='grey' style='font-weight:bold'>search</font> Can anyone give me some suggestions/pointer on how to...

In Dojo, is it safer to use this.own, or is attach-event safe, too?

javascript,dojo
I can choose between two ways of attaching an event to a dijit. I can attach an event using data-dojo-attach-event: <div data-dojo-attach-event="onclick: _onClick"></div> Or, I can attach an event using this.own: this.own( on(this.someNode, 'click', '_onClick') ) With respect to cleaning up event handlers, which is safer? I know that this.own...

How to replace a div in dojo. Div is repeatedly displayed on each click

javascript,jquery,html,css,dojo
I am having one issue and want to solve it asap. have given enough of time and not able to resolve. please help. On a drop down select, I show a div dynamically using below code: which is nothing but a dojo file uploader. on drop down select, it call...

dgrid / dstore / Rest - How to add additional query parameters to request

dojo,dgrid,jsonreststore
I used an older version of dgrid (onDemandGrid) toghether with a dojo JsonRestStore. My web page has some input fields (e.g. date, name etc). After changing one of these fields I change the query of the grid: grid.setQuery({y: year, m: month, l: name1, d: flag, e: name2}); and the Json...

setting value of dijit/form/numbertextbox sets displayedValue — not value

javascript,dojo,dijit.form
I'm setting the value of a dijit/form/NumberTextBox programatically and when I debug I see that the displayedValue has been set, not the value. Any idea why it would behave this way? My NumberTextBox is located on a template widget, maybe that has something to do with it? Template: <input type="text"...

How to color a single Dojo button?

html,css,dojo
Is there a way to affect a single Dojo button's color? I want to be able to override the default button color for specific buttons. In the JSP markup I have a button defined like so: <button class="jelam-button-blue" data-dojo-type="dijit/form/Button" data-dojo-id="usdotSearchButton" id="usdotSearchButton" type="button" onClick="csfController.usdotSearch()">Search</button> where the "jelam-button-blue" is defined in our...

FilteringSelect values not submiting in dojo Form

javascript,forms,dojo,dijit.form
I'm making a dijit.form.Form with two filteringSelect with the possibility to add more custom filteringselects dynamically, but when I try to post the Form with xhr.post no values are submitted, I've tried to convert the form to Json before posting but the object comes empty. I know I can access...

Is there a method in dojo 1.6 to get the current page for dojox.grid.EnhancedGrid?

dojo,dojox.grid.datagrid,dojox.grid
My first question, please be kind. I'm using the Enhanced Grid's pagination plugin and I cannot find how to get the handle on the current page. For example: I am on page 3 of 10 pages, i want to store this page number in my cookie so that when I...

IE Error TypeError: Unable to get value of the property 'set': object is null or undefined

javascript,jquery,web,struts2,dojo
I am getting the following error when i run my web application in IE9. The application is using Struts and DOJO UI. Development console is showing: TypeError: Unable to get value of the property 'set': object is null or undefined This error does not occur in FF or other browsers....

How can I return the value of a deferred method in javascript

javascript,dojo,deferred,arcgis-js-api
I am trying to write a module which projects coordinates into a new Spatial Reference, but the javascript syntax has beaten me once again. This is how the module currently looks like: define(["esri/geometry/Point", ...], function(Point, SpatialReference, ...){ var gmsvc = new GeometryService("http://server/maps/rest/services/Utilities/Geometry/GeometryServer"); /*...*/ return { /*...*/ //transforms the current point...

How to create custom List item dynamically with Dojo?

javascript,dojo
You can copy/paste the following code in Notepad or whatever : <!DOCTYPE HTML> <html> <head> <title>index</title> <meta name="viewport" content="width=device-width,initial-scale=1,maximum- scale=1,minimum-scale=1,user-scalable=no"/> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js" data-dojo-config="async:...

Django - Dojo/Dgrid - how to manage LARGE data sets

mysql,django,dojo,django-rest-framework,dgrid
I am developing a web application that will handle/manage a VERY LARGE data set - Currently any kind of heavy load causes the browser to lock up - whether I'm in the Django Rest Framework API or in the Dojo/Dgrid. This is kind of a dual question. I've researched and...

dojo Grid renderCell Textarea

dojo,textarea
I'm trying to create a grid from json data. Each cell will be editable eventually. One column contains type dependant data and based on the type I want to show either a pair of date pickers (start/end date) or Textarea or some other widget. I'm using renderCell to attempt to...

how to code external onclick dojo dialog

dojo,dialog,buttonclick
How does one code to use an external js function for onclick handler in a button in an dialog with the ability to pass values from dijit.Dialog elements or must it be coded entirely inline?

How to fix TypeError: transform(…) is null

dojo,dgrid
Another individual said this error is generally caused by "a widget template that is referencing a property via ${...} that doesn't actually exist in the widget." I've researched and can't seem to find a way to resolve this error. Any advice or leads to help solve this issue? How do...

How can I use lodash in dojo?

dojo,lodash
Is there a module for lodash that I can import into my dojo project? I know that I can always reference it by window._, but I wanted to be more conventional (as far as dojo is concerned) and formally require it into my module. Thanks in advance....

can not able to load dojo.js

javascript,dojo
As I am trying my hands on dojotoolkit, I try to run (open) following html code in my browser, as they said on tutorial, but my browser does not able to load dojo.js At time of troubleshooting I found that source URL is converted like following: file://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js <!DOCTYPE html> <html>...

How to Create Dojo Widget using C3

javascript,dojo,widget,c3
I couldn't find any example describing the creation of Dojo Widget using C3 library. Before trying to create a widget, I tried to create a module, and it worked. I am new with Dojo ... so here is what I tried to create a Widget with c3 : require([ "dojo/_base/declare",...

Regular expression to check if number is greater than 1

java,validation,dojo
Could someone help me to generate a regular expression for checking if entered number is greater than 1. This is what I tried:'[1-9][0-9]|[2-9]' but this does not allow me to enter more than 2-digits. I very new into this.Please help me..

Dgrid - Display label for number (i.e. 02 = Cat) I want to display Cat - not the number

javascript,database,dojo,dgrid
In my Dgrid I have a column that displays the code (in number format) for an event. enter image description here I want to display the label not the number in the dgrid. So if 1 = Cat. In the database it shows as a 1 - but I want...

Why Dojo grid.refresh is making another server call?

javascript,dojo,dojox.grid
We are using dojo JsonRest. Whenever we need to refresh the grid with new data, dojo is firing two server calls. Below is the code. var MyJsonRest = declare(JsonRest, { get: function(id, options) { return this.inherited( arguments, [id, lang.mixin(this.headers, options)]); } }); myDataStore = MyJsonRest({ target: someurl, headers: { 'moduleUName':...

Do dojo widgets emit an event when destroyed or can you force one to?

javascript,dojo
I have a custom widget based on _WidgetBase. I create it in JavaScript and would like to know when it is destroyed. Code in parent: var editRelatedTableWidget = new EditRelatedTable().placeAt(dom.byId("docEditorWidget"); editRelatedTableWidget.startup(); on(editRelatedTableWidget, "click", function () {console.log("DIJIT CLICKED"); }); // works on(editRelatedTableWidget, "destroy", function () { console.log("DIJIT DESTROYED"); }); // does...

dijit/Tree is not updated when connected to a dojo/store/JsonRest

dynamic,dojo,notify,dijit.tree,jsonreststore
I have modified the dojo tutorial at http://dojotoolkit.org/documentation/tutorials/1.10/store_driven_tree/demo/demo.html to read from a JsonRest store. The problem is that the tree display doesn't update when I click "Add new child to selected item" e.g. on the root element, although the update worked in the original tutorial. I have compared what dojo/store/Memory...

dojo: using registry.byID returns “undefined”

javascript,dojo,amd
I have problems to retrieve a button-widget with dojo/registry. I have a widget and inside it's postCreate-function some other functions are called. In the last one registry.byId() returns "undefined" causing an error. The element with the provided id does exist in the html-template. I have also created an very simple...

Change CSS class of a
using dojo

javascript,html,css,dojo,frontend
I would like to change the element's CSS class depending on the if statement. This is what I have: HTML <div data-dojo-attach-point="waitIcon" class="rightNode"> CSS .rightNode{ float: right; height: 75px; width: 60px; margin-top: 20px; } .noWaitIcon{ float: right; height: 75px; width: 60px; margin-top: 34px; } JS if (value == 0){ domClass.remove(this.waitIcon,...

Using Dojo Grid with a Memory store

javascript,dojo,dojox.grid.datagrid,dojox.grid
I'm having some problems getting the Dojo Grid widget to work. The grid itself is added declaratively: <table data-dojo-type="dojox.grid.DataGrid" data-dojo-attach-point="relationshipsGrid"></table> Next, I'm trying to bind the grid to a Memory data store: var relationships = [ { id: 1, market: "SE", entity: "An object" }, { id: 2, market: "SE",...