dojo

ItemFileWriteStore: how to change the data?

久未见 提交于 2019-12-24 01:01:22
问题 I'd like to change the data in my dojo.data.ItemFileWriteStore. Currently I have... var rawdataCacheItems = [{'cachereq':'14:52:03','name':'Test1','cacheID':'3','ver':'7'}]; var cacheInfo = new dojo.data.ItemFileWriteStore({ data: { identifier: 'cacheID', label: 'cacheID', items: rawdataCacheItems } }); I'd like to make a XHR request to get a new JSON string of the data to render. What I can't work out is how to change the data in the "items" held by ItemFileWriteStore. Can anyone point me in

Dojo - “Tried to register widget with id==centerPane but that id is already registered”

别说谁变了你拦得住时间么 提交于 2019-12-24 00:48:37
问题 I'm having trouble with a content pane in Dojo where it is appearing for a second with the content then disappearing. I am getting the following error: Uncaught ReferenceError: dijit is not defined index.php:22 dojo/parser::parse() error Error arguments: undefined get stack: function () { [native code] } message: "Tried to register widget with id==centerPane but that id is already registered" set stack: function () { [native code] } type: undefined __proto__: d I have come accross answer

Dojo custom build getting browser errors due to missing resources

佐手、 提交于 2019-12-23 19:27:54
问题 I've been struggling with learning the AMD based Dojo build system. So far I haven't been able to get a build that is usable without getting load errors in the browser (FF). I have questions about how to manage the build. My build profile file has a packages section. What I specify there seems to directly correlate to those same package directories being written into the destination directory. This seems appropriate. However, I also have a layers section that is trying to merge just the

How to detect if a text-field needs to wrap in JavaScript/dojo?

亡梦爱人 提交于 2019-12-23 19:00:20
问题 I have a textfield in a grid in which I wish to turn off text wrapping, but display a tooltip with the full text if wrapping is required. So, how could I detect if a field needs to wrap? I tried to query the field's length, but it was either in em or in px based on if the user resized it. How could I get the wrapping status? 回答1: An option to detect if the text wraps - create (with jQuery, for instance) an invisible span with the same font settings and white-space: nowrap , set it's text to

How can I connect GWT to CometD/Bayeux events?

旧城冷巷雨未停 提交于 2019-12-23 17:07:00
问题 I've got a GWT application, which periodically needs to update the screen with new tick items as they come in. We also have messages published by a CometD/Bayeux server (for a different AJAX application) and I'd like to consume them in my GWT. Of course, I can drop into JavaScript, hook up Dojo, and receive callbacks in the JavaScript layer - and from there, route a call into GWT Java code via a JSNI - but there doesn't appear to be any support in GWT directly for using long push or async

Dojo console error objects empty

一笑奈何 提交于 2019-12-23 16:18:57
问题 All of a sudden the errors that Dojo (1.8.3 from Google CDN) is spitting out empty errors, which makes debugging impossibly hard. For example, if I forget to require a dependent before using it, I get the usual > dojo/parser::parse() error ReferenceError {} ... in the error console, but I remember getting more information in the ReferenceError (spindown arrow was present), giving me the arguments of the error as well as the message making it easy to figure out what I had done wrong. I have

How we can pass dojo EnhancedGrid Store items to spring MVC Controller and save in DB?

寵の児 提交于 2019-12-23 12:47:33
问题 My requirement is to do read, update, delete & insert operations of datas from DB using front end as DOJO & Spring MVC. I am able to fetch the records from db and display in DOJO Enhanced Grid(Editable Grid). On editing the grid data, I don't know how to send the Grid Store Items to my Spring Controller and Update/Insert/Delete in my DB. Here is the code I have tried to fetch the data from java controller to front end. Controller Class @RequestMapping(value="eiaProjectSummary", produces =

How to change Dojo TabContainer behaviour to simply open an external link instead of showing a ContentPane?

ぐ巨炮叔叔 提交于 2019-12-23 12:32:39
问题 I am working with a TabContainer having several different ContentPane children. Each of them is equipped with a href param to fetch external AJAX content shown when a tab is being selected: dojo.addOnLoad(function() { var tc_nav = new dijit.layout.TabContainer({ style: 'width: 98%;', doLayout: false }, 'tc_nav'); var cp1 = new dijit.layout.ContentPane({ title: 'Test 1', href: 'ajax?test1', style: 'padding: 10px;', selected: true }); dojo.connect(cp1, 'onShow', function() { cp1.refresh(); });

Dgrid Resizing within BorderContainer

China☆狼群 提交于 2019-12-23 12:26:36
问题 I have a dgrid within a BorderContainer with "liveSplitters" enabled (using Dojo 1.8). The dgrid comes up nicely, but when I move the splitter between the left column and the "leading" column (that the dgrid is within), the dgrid does not properly resize. However, if I resize the window a tad, then the dgrid snaps back into a proper size (i.e. filling 100% of the "leading" pane of the BorderContainer). I have dgrid set to 100% width in CSS. Is there some way I need to tell dgrid to refresh

how to check dojo.datagrid loading completed? [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-23 12:26:27
问题 This question already has answers here : How to determine if a dojo grid has finished loading? (4 answers) Closed 6 years ago . I have a dojo.datagrid in one of my pages. Datagrid and its store(by calling an URL) are created by declarative method. not by dynamic/programmatic. I need to execute a javascript method which displays a div(which requires few data from the datagrid) just below my datagrid. I should display the div only after my datagrid loading completed;not before that. I am