dojo

Dojo IE DataGrid inline editing

守給你的承諾、 提交于 2019-12-02 02:05:18
I have enabled inline editing of cells in DataGrid and it is working fine all browsers except IE. The problem is that after double clicking a cell and performing changed in values of cell, I have to double click on another cell within the grid. If I single/double click outside the grid, the cell which the user was editing still remains in edit mode. I have overridden the onApplyCellEdit event of datagrid to capture changes and submit to server. There is no javascript error in developer tools console of IE Any ideas or pointers to this? This has also been added to the other linked question but

Suppress writing errors to browser console from dojo/request

无人久伴 提交于 2019-12-02 01:16:34
Does anybody know how to suppress errors from being shown in browser console when executing dojo/request. For example, I make a post request to backend which returns HTTP 400 telling me that an error has occurred because of validation check. I will handle it appropriately in my code, show some validation warnings but still dojo/request logs the error into console: This example is on HTTP500, but it's the same in HTTP400. This is a code snippet var results = request.post("/webapp/target/save", { data: dojo.toJson(this._dataObject), headers: this.headers, handleAs: "json" }); There has to be a

not able to call a function on pagination dojo enhancedGrid

▼魔方 西西 提交于 2019-12-02 00:50:23
I tried all the possible ways but it's not working. I want to call a function when I move to another page in a dojo dataGrid (during pagination). I tried the below code, but it's not working... method one: nextPage = function(src) { alert("going"); }; grid.startup(); method two: grid.on("nextPage", function(evt){ alert("next"); }, true); method thee: grid.pagination.plugin.nextPage = function(src) { alert("here"); }; None of these methods are working. Please give sample code which will be called by clicking on any page numbers to move to another page... Here is a dirty solution with a working

Dojo: how to remove comma from value

怎甘沉沦 提交于 2019-12-01 20:46:20
问题 I have this Dijit number spinner: <div class="extra_field hide_on_load form_action_fy"> <label>Action Fiscal Year</label> <input name="form_action_fy" id="form_action_fy" data-dojo-type="dijit.form.NumberSpinner" data-dojo-props=" value:@ViewBag.fy, smallDelta:1, largeDelta:1, constraints:{min:2010,max:2020,places:0}" /> </div> After this input loses focus, a comma is added. How do I prevent this comma from showing? That is, I don't want 2,011 but rather 2011. Thanks! Eric 回答1: The simple

Node.innerHTML giving tag names in lower case

筅森魡賤 提交于 2019-12-01 19:55:51
I am iterating NodeList to get Node data, but while using Node.innerHTML i am getting the tag names in lowercase. Actual Tags <Panel><Label>test</Label></Panel> giving as <panel><label>test</label></panel> I need these tags as it is. Is it possible to get it with regular expression? I am using it with dojo (is there any way in dojo?). var xhrArgs = { url: "./user/"+Runtime.userName+"/ws/workspace/"+Workbench.getProject()+"/lib/custom/"+(first.type).replace(".","/")+".html", content: {}, sync:true, load: function(data){ var test = domConstruct.toDom(data); dojo.forEach(dojo.query("[id]",test)

Dojo: how to remove comma from value

孤街醉人 提交于 2019-12-01 18:34:09
I have this Dijit number spinner: <div class="extra_field hide_on_load form_action_fy"> <label>Action Fiscal Year</label> <input name="form_action_fy" id="form_action_fy" data-dojo-type="dijit.form.NumberSpinner" data-dojo-props=" value:@ViewBag.fy, smallDelta:1, largeDelta:1, constraints:{min:2010,max:2020,places:0}" /> </div> After this input loses focus, a comma is added. How do I prevent this comma from showing? That is, I don't want 2,011 but rather 2011. Thanks! Eric The simple answer is to add pattern:'#' to your constraints object. The pattern property allows you to specify how you

What is the best practice for passing variables from one HTML page to another?

Deadly 提交于 2019-12-01 18:14:05
I'm relatively new to web application programming so I hope this question isn't too basic for everyone. I created a HTML page with a FORM containing a dojox datagrid (v1.2) filled with rows of descriptions for different grocery items. After the user selects the item he's interested in, he will click on the "Submit" button. At this point, I can get the javascript function to store the item ID number as a javascript variable BUT I don't know how to pass this ID onto the subsequent HTML page. Should I just pass the ID as an URL query string parameter? Are there any other better ways? EDIT: The

How to set target property when simulating mouseclick in javascript?

試著忘記壹切 提交于 2019-12-01 18:08:53
I want to simulate a mouseclick in my javascript code which uses dojo. The action for a real mouseclick will be registered using dojo-stuff with "ondijitclick". I know which method/function gets called and I also have the dijit object to call this method. The method expects an function object as parameter, so I'm creating a new MouseEvent object. This all works fine, except that I need to set the target value of this event and I can't figure out how to do this. This is needed because later exception handling is accessing the target-property and I can't avoid this. So far the code I have: dojo

Submit the dijit editor contents

蓝咒 提交于 2019-12-01 17:37:52
I am trying to learn the dijit editor. I want to replace an existing text area with dijit editor widget.So I wrote 2 jsps - one using the dijit.Editor which feeds another jsp with the editor contents. When I click submit the second jsp "result " comes up empty contents for the editor no matter what is typed in text area editor. dijitEditor.jsp <script type="text/javascript"> dojo.require("dijit.Editor"); dojo.require("dijit._editor.plugins.LinkDialog"); dojo.require("dijit._editor.plugins.AlwaysShowToolbar"); </script> <script type="text/javascript"> dojo.addOnLoad(function(){ alert("addOnLoad

How to set target property when simulating mouseclick in javascript?

只谈情不闲聊 提交于 2019-12-01 17:24:35
问题 I want to simulate a mouseclick in my javascript code which uses dojo. The action for a real mouseclick will be registered using dojo-stuff with "ondijitclick". I know which method/function gets called and I also have the dijit object to call this method. The method expects an function object as parameter, so I'm creating a new MouseEvent object. This all works fine, except that I need to set the target value of this event and I can't figure out how to do this. This is needed because later