dojo

How can filter definition of dojo EnhanceGrid be transfered to server-side

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 05:13:46
问题 I'm using filter plugin of dojox.grid.EnhancedGrid. Its introduction is at http://dojotoolkit.org/reference-guide/dojox/grid/EnhancedGrid/plugins/Filter.html#dojox-grid-enhancedgrid-plugins-filter. And to implement the server-side filter, it says: " By default, the server side is assumed to be stateless (REST style). In this case, you should send the filter definition to server side along with the fetch request of the store. You can do this by modifying the request object every time before

(dojo) Observable cannot observe changes in Memory Store

白昼怎懂夜的黑 提交于 2019-12-11 04:56:21
问题 I have the following code to implement Observable Memory Store var inventory = [ {name:"shoes", quantity:10, category:"sales"}, {name:"clothes", quantity:5, category:"sales"}, {name:"hats", quantity:2, category:"sales"}, {name:"shirts", quantity:20, category:"sales"} ]; var inventoryStore = new Memory({data:inventory, idProperty: "name"}); var observer = new Observable(inventoryStore); results = observer.query({}); results.observe(function(item, removedIndex, insertedIndex) { if(removedIndex

How to show values above bars in a dojox columns chart

对着背影说爱祢 提交于 2019-12-11 04:45:17
问题 Is there any way to show the y-value of every bar above the actual bar in a dojox columns-type chart? Here's my code (which I got from http://glenurban.me.uk/A55D03/Blog.nsf/dx/DojoChart.htm): <script type="text/javascript"> dojo.require("dojox.charting.Chart2D"); var series1 = [ 3, 2, 5, 3, 6, 4]; var xlabels = [ {value : 1, text : "a"}, {value : 2, text : "b"}, {value : 3, text : "c"}, {value : 4, text : "d"}, {value : 5, text : "e"}, {value : 6, text : "f"}, {value : 7, text : "g"}]; var

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 =

Non case-sensitive sorting in dojo dgrid

不问归期 提交于 2019-12-11 04:06:41
问题 Is it possible to sort without case-sensitivity? For instance, sorts by default show up like this: Awesomeman adam beyonce but, I'd like to sort like: adam Awesomeman beyonce Is it possible to override the sensitivity easily? From what I can tell the grid inherits from OnDemandGrid and OnDemandList , which both inherit from Grid and List . For my store, I am using Memory wrapped in Observable . As of now, I'm trying to overwrite _setSort in List.js , however that's not working. Anyone out

Is it possible to use Dojo build without modifying JS files?

放肆的年华 提交于 2019-12-11 03:31:58
问题 Is it possible to use Dojo build without the need to modify JavaScript files? The article dgrid and Dojo Nano Build provides the instruction to create the build, but it requires adding the following line into JavaScript file, which initializes the application: require(['dgrid/dgrid'], function () { (replacing 'dgrid/dgrid' with your build module name). However, it is very problematic when using build for own modules, because, of course, in development mode the require with own layer can't be

add text to dojo chart (in this case scatter chart)

爱⌒轻易说出口 提交于 2019-12-11 03:06:54
问题 I want to add custom text to my (scatter) chart. I could netiher find an example nor any other appropriate dojo function for that. By now I have a tooltip for each point of my scatter chart, but I'd rather like to have a label for it. Any idea? Thanks! 回答1: You need to upgrade to dojo 1.9.7 at least to use this answer: First of all, You have to set a new option: "labelStyle: 'outside'". This position the text uppon the circle in case the label width is larger than than the circle. The next

dojox.grid.DataGrid: how to access data from a click event?

删除回忆录丶 提交于 2019-12-11 03:03:52
问题 I'm using Dojo 1.5 (including dojox). I have a dojox.grid.DataGrid where each row represents a user. When I click a row, I want to redirect to a URL like /users/USER_ID. The user ID is one of the fields in the grid, so all I need to do in my onRowClick callback is to grab the user ID for the row that was clicked. The click event contains a rowIndex property, and, indeed, I found a (rather old) post elsewhere that suggested I should be able to do: var row = dijit.byId('grid').model.getRow(e

How to apply standby.show to the full body of html

邮差的信 提交于 2019-12-11 02:43:29
问题 I would like to know how to apply standby.show to the full body of html? I tried applying it but it does not work. regards Clement 回答1: set the target of the standby widget to document body. require([ "dojox/widget/Standby" ], function(st) { var standby = new st({ id : "StandyBy1", target : dojo.body(), }); document.body.appendChild(standby.domNode); standby.startup(); standby.show(); }); 回答2: At first have a look here for using standby : http://dojotoolkit.org/reference-guide/1.9/dojox

Dojo Datagrid Sort after adding New Item to Store

安稳与你 提交于 2019-12-11 02:25:46
问题 I'm having an issue with a DataGrid not resorting itself after calling newItem() then save() on the store backing the datagrid. <div dojoType="dojo.data.ItemFileWriteStore" url="/MultiRaterManagerAjax" id="mrWriteStore" jsId="mrWriteStore"</div> <table dojoType="dojox.grid.DataGrid" region="left" query="{ hasSub: false }" clientSort="true" selectionMode="single" jsId="ldrSubGrid" sortInfo="1" errorMessage="Loading..." store="mrWriteStore"> <thead> <tr> <th width="100%" field="_item" formatter