dijit.form

How do I get my regular expression code working on my dojo cellWidget object?

廉价感情. 提交于 2019-12-12 06:08:59
问题 How do I get my regular expression code working on my dojo cellWidget object? I'm trying to get this regex working in two places, one with an IP address and another just a simple number field for values between 0 and 3000 but no matter what I try it seems to not like anything. Sometimes I can type a single digit number and I don't get my validation message, otherwise I always get the validation message on both of these. I am using a dijit/form/ValidationTextBox for this Here is my code: { id:

Synchronize interdependent Dojo widgets/values

痞子三分冷 提交于 2019-12-12 05:09:04
问题 I'm about to build a simple "mortgage calculator" where a user is to adjust some sliders OR edit values in input fields in order to calculate some final value based on the provided data. Schematically it will look something like this: Slider1 - Input1 Slider2a - Input2a Slider2b - Input2b The idea is that the value of the input must be reflected in the slider, and vice versa. In addition, the values and limits of slider 2a/2b and input 2a/2b depend on each other, according to some simple rule

How to disable focus for an option in `dijit/form/Select`?

假装没事ソ 提交于 2019-12-12 04:31:48
问题 I need to change behavior for a widget dijit/form/Select . Widget should not allow focus (from mouse or using the keyboard) for options which have property disabled: true . I would like to know if you can point me out how to achieve this result. require([ 'dijit/form/Select', 'dojo/_base/window', 'dojo/domReady!' ], function(Select, win) { var select = new Select({ name: 'select2', options: [{ label: '<i>Swedish Cars</i>', value: '', disabled: true }, { label: 'Volvo', value: 'volvo' }, {

How to add a `HTML label` before a `ValidationTextBox` dynamically?

痞子三分冷 提交于 2019-12-12 03:33:35
问题 I need to add dynamically HTML labels before each ValidationTextBox . ValidationTextBox and HTML label are created accordingly to the number of property present for object data . I would need an example on how to do it. Example: http://jsfiddle.net/F2qAN/97/#run dojo.require("dijit.form.ValidationTextBox"); dojo.require("dijit.layout.ContentPane"); function build() { var data = { name: 'a', surname: 'b', age: 'c' }, validationTextBox, layout = new dijit.layout.ContentPane({}); Object.keys

Get value of checkbox in dojo, with on() method

 ̄綄美尐妖づ 提交于 2019-12-12 02:29:16
问题 Using dojo 1.9, I'm trying to access the value of a checkbox not like in the example in the docs: require(["dijit/form/CheckBox", "dojo/domReady!"], function(CheckBox){ var checkBox = new CheckBox({ name: "checkBox", value: "agreed", checked: false, onChange: function(b){ alert('onChange called with parameter = ' + b + ', and widget value = ' + this.get('value') ); } }, "checkBox"); }); but by moving onChange event to: query('#checkBox').on('change', function(){ var value = query(this).attr(

Populating ComboBox dynamically in dojo

蓝咒 提交于 2019-12-11 20:39:54
问题 I am trying to populate a ComboBox dynamically in dojo. I have declared it in html and I am trying to created the Memory store in js and then setting the store attribute for the ComboBox with that value of store which I am creating in js. Here are my html and javascript files. I am calling a function in js which get a json response( item ) as its argument and in that response values are coming( ResultData1,ResultData2,ResultData3 ) I have tested that by keeping alert boxes. But when running

Used dijit css in two pages, but working in first page only, in second page getting blank page

我是研究僧i 提交于 2019-12-11 16:46:43
问题 I have used dijit css for dijit/horizontalSlider in two pages , slider is getting loaded in first page but in second page getting blank. dojoz/data/DataGrid also loaded correctly in first page, but in second page getting blank. UPDATED: I have two buttons in home.html(parent page) and calling django templates grid.html and move.html. Here is grid.html source code <!DOCTYPE html> <html > <head> {% load staticfiles %} <link rel="stylesheet" href="{% static 'pmda_app/dojo/../dijit/themes/claro

Dojo displaying multiple tooltip on page

China☆狼群 提交于 2019-12-11 14:45:08
问题 I have a Dojo form and i would like to return errors to the form and display them in tool tips since i do not want to add extra elements to my form layout. On researching i saw Dojo doesn't allow for such implementation out of the box since the tool tip will only be displayed in items in focus. In my case i would like tool tips to be displayed for multiple items e.g for all null fields. I came across a blog where a guy did a hack however i am not sure about his implementation of such. I would

Replacing Dojo/Dijit NLS strings

醉酒当歌 提交于 2019-12-11 14:06:53
问题 I wish to override a NLS file (dijit/form/validate.js) file with a new one, or replace some of the NLS string mappings. I want this file to be picked up by the standard Dijits. I do not wish to delete the file in the standard Dojo library. Can I specify a path in djConfig to search directories for NLS files in order so my new file is picked up instead of the the original? If so, how do I do this? Alternatively how can I mix in a new definition of a string i.e replace: missingMessage: "This

Possible bug - Event change fires after widget.set('options', [])

霸气de小男生 提交于 2019-12-11 05:35:01
问题 Currently I am using dijit/form/Select to display a list of options and I need to programmatically update content for the dijit/form/Select . Currently I am using .set('value', ...); but I have noticed that event change is fired (which is in my case is not wanted). I need to be able to update the widget and selecting a value without having fired change event. The change event, afaik, it should be fired only when an user "change" the value of the Select list clicking on it. require(["dijit