dijit.form

Convert decorator to custom widget in DOJO?

时间秒杀一切 提交于 2019-12-11 04:18:59
问题 I would like to know if it possible to convert my decorator function in a custom widget (based on dijit/form/Select ) in order to apply a monkey patch. Or do you know an alternative solution ? require([ 'dijit/form/Select', 'dojo/_base/window', 'dojo/domReady!' ], function(Select, win) { var decorator = function(select) { select.on('change', function(value) { alert(value); }); select.dropDown._onUpArrow = function() { this.focusPrev() }.bind(select.dropDown); select.dropDown._onDownArrow =

dijit.form.Select won't set value programmatically

Deadly 提交于 2019-12-10 18:34:41
问题 I have a dynamic dojo form in which I have a dijit.form.Select whose selected value I have tried to set dynamically through various ways. I get the select widget to load and show the data, but it always ignores my every attempt. I am using dojo 1.7. var bcntryval = <?= $this->billingContact->countryId;?>; var countryStore; function onBillingShow() { if (countryStore) countryStore.close(); countryStore = new dojo.data.ItemFileReadStore({url: 'CartUtilities.php?action=getcountries'}); dijit

loading dijit calendar on click of dijit icon button with specific dates disabled

眉间皱痕 提交于 2019-12-08 07:51:10
问题 I'm trying to load a dijit calendar on click of dijit icon button with specific dates disabled, for this I tried two ways first one: loading calendar in js function getting error as trying to register "id==mycal" but that id is already registered ." <button data-dojo-type="dijit.form.Button" data-dojo-attach-event="onClick:oncldriconclick" data-dojo-props="iconClass:' dijitIconTable', showLabel: false" type="button"></button> <div id="mycal" data-dojo-attach-event="onclick: _onDayClick" ><

Dojo/Dijit setting invalid message and failing validation

江枫思渺然 提交于 2019-12-08 05:53:23
问题 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

Dojo: dojo onblur events

会有一股神秘感。 提交于 2019-12-07 05:55:33
问题 I have a form setup with dojo 1.5. I am using a dijit.form.ComboBox and a dijit.form.TextBox The Combobox has values like "car","bike","motorcycle" and the textbox is meant to be an adjective to the Combobox. So it doesn't matter what is in the Combobox but if the ComboBox does have a value then something MUST be filled in the TextBox. Optionally, if nothing is in the ComboBox, then nothing can be in the TextBox and that is just fine. In fact if something isn't in the Combobox then nothing

Using dijit.InlineEditBox with dijit.form.Select

好久不见. 提交于 2019-12-06 15:53:34
I'm trying to use a dijit.form.Select as the editor for my dijit.InlineEditBox. Two problems / unexpected behavior seem to occur: Inconsistently, the InLineEditBox doesn't have the initial value set as selected Consistently, after selecting a choice, the value that should be hidden is shown instead of the label. The width isn't set to 130px Here's working code: http://jsfiddle.net/mimercha/Vuet8/7/ The jist <span dojoType="dijit.InlineEditBox" editor="dijit.form.Select" editorParams="{ options: [ {label:'None',value:'none'}, {label:'Student',value:'stu'}, {label:'Professor',value:'prof'

Value of dojox.CheckedMultiSelect not being posted with dojo.xhrPost

∥☆過路亽.° 提交于 2019-12-06 07:14:01
When I post a form using dojo.xhrPost , I get all the fields in my form POSTed except for the value of my dojox.CheckedMultiSelect, no matter what options are selected. The declaration of my CheckedMultiSelect: <div dojoType="dojo.data.ItemFileReadStore" jsId="processTypeList" url="json/processtypelist.json.php"></div> <label for="processTypeSelect">Process Types</label> <select dojoType="dojox.form.CheckedMultiSelect" name="processTypeSelect" id="processTypeSelect" multiple="true" style="height:166px;" store="processTypeList"></select> And here is my xhrPost: <button dojoType="dojox.form

Dojo: dojo onblur events

我怕爱的太早我们不能终老 提交于 2019-12-05 10:05:41
I have a form setup with dojo 1.5. I am using a dijit.form.ComboBox and a dijit.form.TextBox The Combobox has values like "car","bike","motorcycle" and the textbox is meant to be an adjective to the Combobox. So it doesn't matter what is in the Combobox but if the ComboBox does have a value then something MUST be filled in the TextBox. Optionally, if nothing is in the ComboBox, then nothing can be in the TextBox and that is just fine. In fact if something isn't in the Combobox then nothing MUST be in the text box. In regular coding I would just use an onBlur event on the text box to go to a

Dojo Exception on hiding a dijit.Dialog

空扰寡人 提交于 2019-12-05 02:38:33
问题 I have a Dialog with a form inside. The following code is just an example of what I'm trying to do. When you close a dijit.Dialog, if you dont't destroy recursively his children, you just can't reopen it (with the same id). If you don't want to destroy your widget you can do something like that : var createDialog = function(){ try{ // try to show the hidden dialog var dlg = dijit.byId('yourDialogId'); dlg.show(); } catch (err) { // create the dialog var btnClose = new dijit.form.Button({

Dojo Select onChange event firing when changing value programatically

瘦欲@ 提交于 2019-11-29 06:22:45
I have a dojo (dijit) select dropdown that calls a js function onChange. I was expecting this to only call the onChange function when the user changes the value in the dropdown, however, it even calls the onChange function when I programatically change the value of the dropdown from js code. How do I get it to only call the function when the user changes the dropdown value? It shouldn't call the function when I programatically change the value. <select jsId="ddlBoundaryType" id="ddlBoundaryType" name="ddlBoundaryType" dojoType="dijit.form.Select"> <option value="0">Circle</option> <option