dojo

Loading indicator with dojo XHR requests

风格不统一 提交于 2019-12-13 03:19:00
问题 I only recently started using dojo and I am doing numerous ajax calls using dojo xhrGet, xhrPost,..etc. Now I have an animated gif image which i want to use to indicate "loading" to the user. I am not too sure how this can be done. Can someone please advise me on this? here is my code, dojo.xhrGet({ url: registcarturl, handleAs: "json", preventCache: true, load: function(data, ioArgs) { //DO STUFF WITH data HERE }, error: function(error) { alert("sorry ! an error occurred while adding to the

Fuzzy Matches on dijit.form.ComboBox / dijit.form.FilteringSelect Subclass

亡梦爱人 提交于 2019-12-13 02:43:43
问题 I am trying to extend dijit.form.FilteringSelect with the requirement that all instances of it should match input regardless of where the characters are in the inputted text, and should also ignore whitespace and punctuation (mainly periods and dashes). For example if an option is "J.P. Morgan" I would want to be able to select that option after typing "JP" or "P Morgan". Now I know that the part about matching anywhere in the string can be accomplished by passing in queryExpr: "*${0}*" when

OneUI app layout, error with pulldown menus

冷暖自知 提交于 2019-12-13 02:33:58
问题 I am using the applayout and OneUI 3.0.2 theme. I have pulldown menus in the banner (application and utility links) but the menu won't show up. Instead I get this JS error: Uncaught lang.hitch: scope["_onKeyPress"] is null (scope="[Widget extlib.dijit.OneUIv302Menu, extlib_dijit_OneUIv302Menu_2]") I have a Windows 9.0.1FP1 where these do work. On a 9.0.1FP1 Linux / 9.0.1FP2 Windows it doesn't work. The Linux machine had FP2 installed before I just downgraded it to FP1 (it was a test to see if

Dojo: Getting access to the clicked item in a dijit.form.Select?

元气小坏坏 提交于 2019-12-13 02:28:41
问题 I have a dijit Select widget and need to do something when the user clicks one of the dropdown items. Meaning I need access to the clicked item, to retrive some information, and call one of my own functions. I've tested to attach an onChange on the select and I can get the text value selected fine. But I need the object and not the value. The object holds more values in a data-info-attribute. Basically what I'm trying to achieve is to show one value in the list but send along more values to

separating javascript and html for readable code

你。 提交于 2019-12-13 02:21:25
问题 sometimes my javascript code is mixing with html and css. in this stuation, my code is beind unreadable. How do you separate the javascript and html side in javascript? For example: (using javascript dojo toolkit) addLayer: function (layer, index) { var layerClass = layer.visible === true ? 'layer checked' : 'layer'; var html = ''; html += '<li class="' + layersClass + '">'; html += '<div class="cover"></div>'; html += '<span tabindex="0" class="info" title="MyTitle"></span>'; html += '<span

Image not displayed in xe:basicContainerNode from Extension Library in XPages

不羁的心 提交于 2019-12-13 01:18:52
问题 I have the following code for a popupmenu from Extension library <xe:popupMenu id="pop"> <xe:this.treeNodes> <xe:basicContainerNode image="/vwicn148.gif" label="Container"> <xe:this.children> <xe:basicLeafNode label="Child" image="/vwicn148.gif"></xe:basicLeafNode> </xe:this.children> </xe:basicContainerNode> </xe:this.treeNodes></xe:popupMenu> <xp:link escape="true" text="Open popup" id="link1"> <xp:eventHandler event="onclick" submit="false"> <xp:this.script><![CDATA[XSP.openMenu(thisEvent,

PhoneGap / Cordova 1.6 and dojo 1.7.2 AMD works from web, not from local?

佐手、 提交于 2019-12-13 01:13:48
问题 I have recently upgraded my PhoneGap/dojo1.6 app to cordova 1.6 and everything works just fine. Then I upgraded to dojo 1.7.2 using hosted dojo: [script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js" data-dojo-config="async: true"][/script] And again, everything works fine. But when I tried to use local dojo, much like I did when using dojo1.6 and cordova1.6, the dojo.js is found and loaded, but the app won't start/load other dojo module files. [script src="dojo1.7.2/dojo

DOJO difference between instantiation and using source

你。 提交于 2019-12-13 00:57:53
问题 I am new to DOJO and trying to figure out the difference between these two uses of the seemingly two things. dndController: new dijit.tree.dndSource("dijit.tree.dndSource",{copyOnly:true}) and dndController: "dijit.tree.dndSource" The second one works, but when I use the first one, it gives me an error when loading my tree. It says type node is undefined. The reason I want to use the first one though is because I want to set copyOnly to true. Any answers appreciated it. 回答1: That parameter

dojo.io.iframe and download of Excel/PDF

心不动则不痛 提交于 2019-12-13 00:45:20
问题 I would like to use a Dojo button to download an Excel or a PDF file. So far I've managed to do it by using a call to dojo.io.iframe in the onClick handler of the button. However, this will only download the file once. Any successive calls will be ignored. This is the call: function exportToExcel() { dojo.io.iframe.send({ url: '/report/export', handleAs: 'xml', content: { __export: 'excel' } }); } As if the dojo.io.iframe does not consider the previous request to be completed. What am I doing

Why will the headings in my dojo dgrid not appear unless I resize the browser?

99封情书 提交于 2019-12-13 00:39:21
问题 I've got a dgrid with headings that will not appear unless I resize the browser window. As soon as I resize the browser window, the headings appear. How can I get the headings to show up without resizing the browser? Am I not calling startup() correctly? Is there an event I can fire to make the dgrid think the browser has been resized? 回答1: Put add the DijitRegistry to the grid as shown here: https://github.com/SitePen/dgrid/wiki/DijitRegistry Put a dijit Container in your content pane (if