dojo

Updating Dojo Dijit FilteringSelect's store with asynchonous data

拈花ヽ惹草 提交于 2019-12-08 11:39:27
问题 I'm using Zend + Dojo form in an intranet context. We need to update a list of counties when the selected state is changed on a form. With HTML you would just parse the json response (or just provide a html fragment of options) and update the innerhtml of the select. However, doing so in Dojo has proved to be prohibitively complex. In short, I have defined a generic method that allows you to set an onBlur update to a form field. This links to a Controller action that calls the database with a

Cannot find a way to pass a hidden value to the action file

被刻印的时光 ゝ 提交于 2019-12-08 10:59:53
问题 Situation: I have two dojo autocompleters on a jsp. Both of them trigger the same action when their value is changed. Now I want that in the action file I should know which autocompleter was changed. What I have done: Normally, in such a situation I would call a javascript to change the value of a hidden field and then access the value of that hidden field in the action file to know which was changed. But I call the javascript using the "onChange" attribute which (unfortunately) does not work

IBM Worklight 6.0 - Hybrid Android Application not working in Emulator and Device

假装没事ソ 提交于 2019-12-08 10:46:52
问题 I have created a Worklight application using Dojo with the Android environment. I tried running that application in the MBS, and it works fine. But when I tried that in emulator and real device, the application fails to load. In the device it shows: unfortunately the application has stopped In the emulator is shows: Failed to Load UI I have also created iPhone environment, there it works fine in both simulator and device. I have copied all the Dojo library files in my project's www folder. I

Dojo - intercepting XHR calls

妖精的绣舞 提交于 2019-12-08 10:30:20
问题 I would like to intercept all dojo.xhr calls on my application in a way to examine the contents of HTTP response before this response gets forwarded to handler functions ( load , error , etc.). How do you suggest to do this? 回答1: I believe what you're looking for is the djConfig variable ioPublish introduced in 1.4. http://dojotoolkit.org/reference-guide/releasenotes/1.4.html#io-pipeline-topics This hooks up three publish topics you can subscribe to: /dojo/io/load , /dojo/io/error , and /dojo

Dojo DataGrid height resize not working

ぐ巨炮叔叔 提交于 2019-12-08 10:28:47
问题 I'm trying a simple "resize" behavior with a Dojo DataGrid object. The "width" is working fine as expected. However "height" is not working, and the Grid is displayed only with the initial rendering value. This is a hyperlink of a HTML file with the problem reproduced. https://www.ibm.com/developerworks/community/files/form/anonymous/api/library/45f7c930-197b-4a26-88c1-2445045c3b0b/document/3db02339-113a-44b3-828b-3c149b1a2f86/media/teste_datagrid.htm This is the source code: <!DOCTYPE html>

DOJO Enhanced DataGrid - update database

笑着哭i 提交于 2019-12-08 10:15:40
问题 Does anyone have a working example of how to update a database table with edited information from DOJO Enhanced DataGrid? I have a postgresql database backend using dojo.data.ItemFileWriteStore which in echos json_encode(...). <head> <script type="text/javascript"> dojo.require("dojox.grid.EnhancedGrid"); dojo.require("dojo.data.ItemFileWriteStore"); dojo.require("dojox.grid.enhanced.plugins.Pagination"); dojo.require("dojox.grid.enhanced.plugins.Filter"); dojo.addOnLoad(function() { // our

Dojo : ComboBox selected and show data id

天大地大妈咪最大 提交于 2019-12-08 08:32:13
问题 I have Dojo ComboBox with data var store = new dojo.data.ItemFileReadStore( { data: { identifier: "name", items: [ {name:"Alabama", id:"AL"}, {name:"Alaska", id:"AK"}, {name:"American Samoa", id:"AS"}, {name:"Arizona", id:"AZ"}, {name:"Arkansas", id:"AR"}, {name:"Armed Forces Europe", id:"AE"}, {name:"Armed Forces Pacific", id:"AP"}, {name:"Armed Forces the Americas", id:"AA"}, {name:"California", id:"CA"}, {name:"Colorado", id:"CO"}, {name:"Connecticut", id:"CT"}, {name:"Delaware", id:"DE"}

Switching between singleton and prototype scope using RequireJS

自古美人都是妖i 提交于 2019-12-08 07:51:27
问题 Spring has very useful option, that whey I define a bean, I define a scope. If it's singleton , only one instance is created. By prototype , each time a bean is required, a new instance is created. RequireJS provides by default singletons, so with such simple module: Singleton.js define([], function() { console.log('Instance initialization') var items = [] var singleton = { getItems: function() { return items }, setItems: function(newItems) { items = newItems }, addItem: function(item) {

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" ><

delete item from a dojo.store.jsonrest

巧了我就是萌 提交于 2019-12-08 06:56:48
问题 I started with this tutorial http://dojotoolkit.org/documentation/tutorials/1.6/store_driven_tree/ after setting up my ServerSide Restfull Service everything is working so far. I made a contextmenu for the tree by: <ul dojoType="dijit.Menu" id="contextMenu" style="display: none;"> <li dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconDelete" onclick="pages.remove(tn.item.id);">delete page</li> </ul> <script type="dojo/connect"> var menu = dijit.byId("contextMenu"); menu