dojo

Dojo : animateProperty for “display”

删除回忆录丶 提交于 2019-12-13 04:25:58
问题 I'm trying to animate changes of the CSS "display" property with Dojo and dojo/_base/fx. Here's my code : function invert_display(id) { var element = dom.byId(id), currDisplay = style.get(element, 'display'), nextDisplay = currDisplay === 'block' ? 'none' : 'block'; baseFx.animateProperty({ node: id, properties: { display: 'none', backgroundColor: '#f00' } }).play(); } Everything seems to work fine, modules are imported properly (AMD style), variable values are valid and the div background

Dojo-DataGrid :: How to dynamically fetch values as options for a select box in Dojo DataGrid

风格不统一 提交于 2019-12-13 04:25:01
问题 I have a Dojo-DataGrid which is programatically populated as below : var jsonStore = new dojo.data.ItemFileWriteStore({ url: "json/gaskets.json" }); var layout= [ { field: "description", width: "auto", name: "Tier/Description", editable:true }, { field: "billingMethod", width: "auto", name: "Billing Method", editable: true, type: dojox.grid.cells.Select, options: [ '0', '1' ] }, { field: "offeringComponents", width: "auto", name: "Offering Component", editable: true, type: dojox.grid.cells

Displaying Data on a JSP page using Dojo Data grid

Deadly 提交于 2019-12-13 04:19:37
问题 I have written this code which is returning a Json string.It contains a set of values(names). Now i want to display these values on a jsp page using Dojo data grid. I Don't know how to use this returned Json string as a data for Dojo grid. And how to format the table Structure. Also i want when i click on a particular row in a table(which in this case contains only a single column - Employee name as per my query) a new Window opens up(probably a new JSP page). how to do that? Please help me

Using hitch / deferred with an xhrGet request

↘锁芯ラ 提交于 2019-12-13 03:57:45
问题 I'm attempted to use deferred and hitch in order to provide a callback for my AJAX request. I'm using the following code: //Code is executed from this function function getContent(){ var def = new dojo.Deferred(); def.then(function(res){ console.lod("DONE"); console.log(res); }, function(err){ console.log("There was a problem..."); }); this.GET("path", def); } //Then GET is called to perform the AJAX request... function GET(path, def){ dojo.xhrGet({ url : path, load : dojo.hitch(def,function

DoJo Enhanced grid updating constraints dynamically is not working

◇◆丶佛笑我妖孽 提交于 2019-12-13 03:45:28
问题 I have a DoJo enhanced data grid with editable number text box with some default min & max constraints. I need to change the constraints once grid loaded completely. Please advise on same. below is the code snippet, where i have applied default constraint as min 0 and max 100. Is it possible to set min and max constraints values from the dataStore fields i.e minAge and maxAge while defining the layout? If not is it possible to update those default constraints? require(["dojox/grid/cells/dijit

Dojo, how destroy a custom widget?

人盡茶涼 提交于 2019-12-13 03:42:11
问题 I have created a custom dijit widget which contains a grid and some buttons. What is the right way to destroy it? override uninitialize, destroy, destroyRecursive? which method and in which order? Thanks. 回答1: Generally uninitialize is the best place to do this, since it is an extension point called within the destroy function before other teardown occurs. That said, depending on how you are adding your child widgets, you may not actually have to do anything. For instance, if you are defining

How to locate buttons in a dojo dialog?

空扰寡人 提交于 2019-12-13 03:38:52
问题 I'm in javascript and dojo. based on the my previous question about dialog with non underlay, I created a dialog. Now i want to add my buttons to the dialog. the button are dojo buttons and all of them are in . How can i locate these in my dialog ? require(["dijit/Dialog", "dijit/DialogUnderlay", "dojo/domReady!"], function(Dialog, DialogUnderlay){ //just for the snippets to get the right styling document.body.className = "tundra"; myDialog2 = new Dialog({ title: "My Dialog", content: "Test

spring3mvcportlet populate JSON dojo select

大城市里の小女人 提交于 2019-12-13 03:34:46
问题 I am new to Spring mvc3 portlet and dojo. I am trying to populate select dropdown with JSON data when jsp is loaded. I want to use dojo and give ajax call to controller and return JSON when jsp is loaded. Any tips will be helpful. 回答1: @Controller @RequestMapping("/yourController") public class YourController { @RequestMapping(value="/combo/{id}", method=ReqestNethod.GET) public String getDropDownData(@ParamValue("id") long id) { List<Combo> combos = commonDao.getCombos(id); String json =

Newbie Dojo - Google CDN Question

心不动则不痛 提交于 2019-12-13 03:32:49
问题 I have a test jsp with: <head> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js" type="text/javascript"> </script> <script type="text/javascript"> dojo.require("dojo.widget.Tree"); dojo.require("dojo.widget.TreeSelector"); dojo.require("dojo.widget.TreeNode"); dojo.require("dojo.widget.TreeContextMenu"); </script> </head> <body> <div dojoType="TreeSelector" widgetId="treeSelector"></div> <div dojoType="Tree" widgetId="treeWidget" selector="treeSelector"toggler="wipe"

Dojo StackedAreas chart doesn't accept objects as values

≡放荡痞女 提交于 2019-12-13 03:20:19
问题 Every Dojo chart that I have worked with has allowed for the use of an array of objects that contain the series of values and tooltips for each value point. When using the StackedAreas chart type, Dojo seems to ignore my values inside the objects. For example: var values = [ {x: 1, y: 10, tooltip: 'test1'}, {x: 2, y: 30, tooltip: 'test2'}, {x: 3, y: 60, tooltip: 'test3'} ]; This works in Lines, Columns and StackedColumns chart types. The chart renders the axis and you can see the markers