dojo

Dojo: Programatically setting checkbox label for adding on TableContainer

对着背影说爱祢 提交于 2019-12-14 03:25:05
问题 after some hours of checking out documentation, I am somewhat desperate: Basically I need to populate a TabContainer with some TextBoxes, and some Checkboxes. All theses neatly arranged: Labels to the left, fields to the right. To have this done I use a TableContainer that I add to the TabContainer, create the TextFields and add them to the TableContainer. All is rendered ok. But when it comes to a checkbox, I can't find the trick to have a label displayed at all. If I: - add a label

DOJO addSeries method in a loop ploting a graph with commulative sum

◇◆丶佛笑我妖孽 提交于 2019-12-14 03:24:25
问题 While creating a dynamic stacked Line chart in Dojo, i use Chart object's addSeries() method with response (JSON array). here for a while i am using two static data arrays. When addSeries method invocations, the charts get created with their commulative sum. That is not actual data of the graph. Here whats wrong with the addSeries method, not ploting the actual data. hare the data array is: var DataArr = new Array ( [20, 30, 30, 30, 30, 45, 50, 0, 30, 119.2, 47.04, 0], [20, 30, 30, 64, 20, 50

Dojo timing issue with dijit/registry and dojo/domReady

∥☆過路亽.° 提交于 2019-12-14 02:59:12
问题 I am working on a one-page application in Dojo which submits forms via ajax and returns parses the return value before rendering the page. When I go about this I end up with a timing error. When the following code is included via a script tag, it logs undefined: require(["dijit/registry", 'dojo/domReady!'], function(registry){ console.log(registry.byId('my-id')) }); When I paste it in the console, I get the expected dijit widget. I suspect that the problem is that this is firing before the

How to use dojox tools in DoJo?

二次信任 提交于 2019-12-14 02:27:55
问题 I am now learning Dojo. So I want to build my first demo by how to use gauges in Dojo. I downloaded the zip package and build an asp.net web project. then all the resources from Dojo package are imported to this project. Because I saw the demo from DoJo website: http://demos.dojotoolkit.org/demos/gauges/demo.html, So I want to copy this demo in my local computer with existing DoJo resources. HTML code below: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits=

modifying text of a div using dojo

半世苍凉 提交于 2019-12-14 02:07:11
问题 I have a dojo widget.For widget i have 2 files A.js and A.html.Now inside A.html i have something like <div id ="xyz" dojoAttachpoint="xyz"> </div> The above line is one line inside the widget template and its a normal html div Now in A.js i make a asynchronous call to server.In the callback function of remote method i want modify the text of span xyz.I tryed following 3 ways, but none of them is working. 1) dojo.byId("xyz").innerHTML = "some text" 2) this.xyz.innerHTML ="some text" 3) var

Typescript typeof on an interface?

拜拜、爱过 提交于 2019-12-14 00:26:27
问题 I've recently discovered the typeof keyword in typescript and it almost saves the day. I want to describe a dojo ContentPane as an interface: declare module dijit { module layout { interface ContentPane extends dijit._Widget, dijit._Container { } } } declare module "dijit/layout/ContentPane" { var ContentPane: typeof dijit.layout.ContentPane; export = ContentPane; } But unfortunately I cannot do a typeof on an interface. I must instead describe ContentPane as a class but since typescript

dojo dojo.data.ItemFileWriteStore slow…?

安稳与你 提交于 2019-12-13 21:31:19
问题 I've got some code that requests some data from a servlet, and renders it in a dojox.grid.DataGrid. This seems to be rather slow though! I'm stuck on how to make it faster. Can anyone help out? I'm testing with Dojo 1.34 FF & Chrome. My code remove all items in the dojo.data.ItemFileWriteStore, then adds new ones that come back from a JSON request. //Define globla var for the WriteStore... var deltaInfo; var rawdataDeltaInfo = <s:property value='%{deltaTableData}'/>; deltaInfo = new dojo.data

Textarea maxlength value not working

我的梦境 提交于 2019-12-13 20:07:46
问题 I have a textarea and I am setting maxlength from JS using DOJO library.The code is as follows: <textarea id="ct" rows="50" cols="50"></textarea> In JS the max length is setting up as follows var el = dojo.byId('ct'); if(el) { dojo.attr(el,"maxLength",'2500'); if (!('maxLength' in el)) { var max = el.attributes.maxLength.value; el.onkeypress = function () { if (this.value.length >= max) return false; }; } } I am using the following text to populate textarea. Twitter's character limit is 140.

Cannot get a reference to a dijit form when the form has a DateTextBox

断了今生、忘了曾经 提交于 2019-12-13 20:02:53
问题 I am having trouble getting a reference to the dijit form widget when the form contains a DateTextBox. The code snippet below demonstrates the problem. When executed, the alert box says "undefined". However, if I get rid of <input ... id="dateTextBox"... /> , I am able to get a reference to the form widget. <!DOCTYPE HTML> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro

Need example of dojo scatter or bubble chart

ぃ、小莉子 提交于 2019-12-13 19:17:03
问题 I'm having a bit of trouble understanding how to tackle the scatter and bubble chart in dojo. Does anyone have an example or good documentation I can look at to help me out? 回答1: unlike any other chart (line,bar,area which takes two inputs per point , x and y) bubble chart takes three inputs per point ( x, y , and size of bubble) Bubble Chart Example: require([ "dojox/charting/Chart", "dojox/charting/themes/MiamiNice", "dojox/charting/plot2d/Bubble", "dojox/charting/plot2d/Markers", "dojox