dojo

Disable cache in ExtLib REST control (which uses dojox.data.JsonRestStore)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 23:59:33
问题 In my XPage I have a xe:djxDataGrid ( dojox.grid.datagrid ) which uses xe:restService which seems to use dojox.data.JsonRestStore . Everything works fine without proxy but my client accesses the application via a proxy because of corporate policy. After a user updates data in the DataGrid it shows old values when accessed behind the proxy. When the REST Control/JsonRestStore sends an ajax GET request to get data, there is no Cache-Control parameter in request headers. And Domino does not

Turn off instant validation when losing focus

自闭症网瘾萝莉.ら 提交于 2019-12-10 21:34:58
问题 I am using dojo as the client framework. I have a ValidationTextBox call txtName as below screen: In txtName , required is set: required="true" If I lose focus and leave txtName empty (tab, or click to another textbox), the validation execute immediately by highlighting by red. My question: Is there anyway that we turn off this, and just only do validation when I click on Save button. I tried set: intermediateChanges="false" but no luck. The same situation with StartDate and EndDate 回答1:

Gridx/Dojo & jQuery : Is there a callback when sorting is completed?

北城余情 提交于 2019-12-10 21:17:30
问题 This table is generated using GridX / dojo in NodeWebkit. The "[BV][B][V]" are links that are handled by jQuery using class selector. However, once I sort the grid, the listeners are unbinded. How do I reapply the click function? Is there a callback when sorting & rendering is complete? 回答1: There is no callback or event that I know of when sorting is complete in gridx. However, the whole grid is re-rendered when it is sorted or filtered. So you can use something like: grid.connect(grid.body,

dojo's private variable

眉间皱痕 提交于 2019-12-10 19:12:26
问题 Is there a good way to define real private variable in dojo? In dojo 1.7/1.8, I have found 2 ways to define private variable, but both of them are static private(shared by all instances of the class) 1.use anonymous immediate function: define([ 'dojo/_base/declare'], function(declare) { 'use strict'; return declare('test.Class2', null, (function(){ var a = 1; return { constructor: function(){ console.log('constructor'); }, geta: function(){ return a; }, seta: function(v){ a = v; } }; })()); }

How to prevent “Unable to get value of the property 'dir': object is null or undefined” error when loading pages in IE9

青春壹個敷衍的年華 提交于 2019-12-10 18:54:54
问题 I have a Dojo 1.7.4 app that is getting "Unable to get value of the property 'dir': object is null or undefined" error when loading pages in IE9. I'm using an AMD build, and the error does not happen when it has to load all the files individually. All the code that I have control over is wrapped in dojo/ready and dom/domReady! calls to the point of paranoia. When the error occurs, and I catch it with the IE9 debugger, and Call stack reveals that the error occurs when calling isBodyLtr, but

dijit.form.Select won't set value programmatically

Deadly 提交于 2019-12-10 18:34:41
问题 I have a dynamic dojo form in which I have a dijit.form.Select whose selected value I have tried to set dynamically through various ways. I get the select widget to load and show the data, but it always ignores my every attempt. I am using dojo 1.7. var bcntryval = <?= $this->billingContact->countryId;?>; var countryStore; function onBillingShow() { if (countryStore) countryStore.close(); countryStore = new dojo.data.ItemFileReadStore({url: 'CartUtilities.php?action=getcountries'}); dijit

Abort DoJo XHR-Request

偶尔善良 提交于 2019-12-10 18:12:17
问题 I'm using the dojo/request/xhr module for HTTP Requests. Is it possible to abort the active request as it is possible with a XMLHttpRequest? Thank you in advance, Frank 回答1: The promise returned by dojo/request/xhr has a cancel method (like normal promises), which aborts the HTTP request. var request = xhr("foo/bar").then(someHandler, someErrorHandler); ... if(!request.isResolved()) { request.cancel(); // aborts request and triggers the error handler } Example here: http://fiddle.jshell.net

Can't select text in input box on IE

末鹿安然 提交于 2019-12-10 18:08:28
问题 I have an input box that is inside of a div, the div has a background image and the input box inside of it is positioned and limited in size / font to work nicely with the background image. In FF everything works as expected, in IE though there is a major issue. I can't select the text inside of the input box using the mouse or use short-cuts like shift-end/home, ctrl-left/right. You can move around using the mouse keys and use the delete/backspace keys to adjust the text. The HTML looks

Zend_Dojo_Form in a layout

早过忘川 提交于 2019-12-10 17:56:57
问题 I have a Zend_Dojo_Form which I have moved from my view (where it works fine) to my layout, as it's something that will be useful on every page. However in the layout the form no longer works - none of the dijit elements appear and it behaves just as a normal HTML form would. Here's the relevant part of my bootstrap: protected function _initView() { Zend_Layout::startMvc(array( 'layoutPath' => '../application/layouts', 'layout' => 'default' )); $view = new Zend_View(); $view->setEncoding('UTF

Creating an interactive events scheduler

◇◆丶佛笑我妖孽 提交于 2019-12-10 17:56:00
问题 I'm attempting to create something with a similar layout to this schedule page. See attached screenshot also. . So what I need is: - "Categories" across the top of the scheduler (Vertical dividers). - "Timeslots (07:00 07:30, etc..)" down the left of the scheduler. User's can then add events via modal screens and assign them "Timeslots" and "Categories". They should then appear in the Schedule in the appropriate locations. The above mentioned example appears to be using Dojo. I found this