dojo

Dojo: Select of empty value for FilteringSelect while required=false

萝らか妹 提交于 2019-12-11 02:24:44
问题 Please look on this code: dojo.require('dijit.form.FilteringSelect'); dojo.require('dojo.store.JsonRest'); dojo.declare('JsonFilteringSelect', dijit.form.FilteringSelect, { constructor: function (options) { dojo.declare.safeMixin(this, options); if (this.url) { this.store = new dojo.store.JsonRest({ target: this.url }); } else { console.log('JsonFilteringSelect: options.url is not defined'); } } }); var getPersonJsonFilteringSelect = new JsonFilteringSelect({ url: '/person/get', name: 'Test',

How do I use javascript to update the values of hidden input fields

倖福魔咒の 提交于 2019-12-11 02:13:41
问题 I have the following fields: First Name: <input type="text" id="tFName" name="tFName" maxlength="50" /> Last Name: <input type="text" id="tLName" name="tLName" maxlength="50" /> I want to use javaScript specifically dojo to update the value of the following hidden input fields: <input type="hidden" name="tFName" value=""/> <input type="hidden" name="tLName" value=""/> what are some ways in Javascript and Dojo to accomplish this? 回答1: If we modify the html some (setting an ID on the hidden

How to run the code sequentially using Deferred?

一世执手 提交于 2019-12-11 01:58:58
问题 Inside of this for-loop, I hope to force it to run the AJAX code block first. With the result (i.e. data.LocationId ), I want to save that on the server, and then run the loop with i decreasing. If you see my console.log, I hope it could be: asyncProcess data.LocationId 7615 asyncProcess data.LocationId 7614 asyncProcess data.LocationId 7613 But actually it is: asyncProcess asyncProcess asyncProcess data.LocationId 7615 data.LocationId 7614 data.LocationId 7613 How can this be achieved? This

keep data-attributes in dijit widgets

依然范特西╮ 提交于 2019-12-11 01:57:06
问题 I've started using the HTML5 data- attributes in my application, but when this is applied to an element that is a dijit widget, it disappears. <button dojoType="dijit.form.Button" data-id="5">Number 5</button> Is dojo actually parsing this and keeping it somewhere? Or is it just removed completely because dojo isn't HTML5 compliant? 回答1: By applying the answer to this question, I was also able to keep the custom data- attributes on the surrounding element. 来源: https://stackoverflow.com

the server responded with a status of 500 (Internal Server Error) when calling webservice

做~自己de王妃 提交于 2019-12-11 01:57:00
问题 I do not have much experience with web applications and just when I thought I have it working something is going wrong. I studied a demo online in C# and then created my own simple version which seems to work fine. All it does is take some input and pass it to the webservice. I then tried implementing a similar webservice in a more complex application and I get the following error with no clear indication as to why it does not work: the server responded with a status of 500 (Internal Server

Could somebody explain to me what exactly is happening in the Dojo's ''dojo/on" module?

人走茶凉 提交于 2019-12-11 01:56:34
问题 I started fiddling around with Dojo.js and came across a thing I don't understand. I'm trying to create my own widget. The widget would be really simple - it would just query all images on the page and make them listen for a 'click' event. Each click would increase the widget's counter attribute by 1. Here's my take on it: define( [ "dojo/_base/declare", "dojo/query", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dojo/text!myProject/folder/myWidgetTemplate.html", ], function(declare, query,

Rally: Query Filtered to Specific Tags

泄露秘密 提交于 2019-12-11 00:54:39
问题 I am writing a custom app for Rally and I would like to filter the data to stories with specific tags. So far I haven't found a way to write the correct syntax to achieve this purpose. Here's an example of a standard query that I would include in the cardboardConfig: var query = new rally.sdk.util.Query('SomeField = "Some Value"'); This works well enough when trying to query a field that contains a single value, but this doesn't appear to work on tags since tags are arrays -- assuming I am

Programmatically Add a new Dojo AccordionPane to Existing AccordionContainer

余生颓废 提交于 2019-12-11 00:48:48
问题 I am trying to add a new AccordionPane to a existing container, but for the life of me I can't get it to work. Is anyone able to suggest where I am going wrong? <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" djConfig="parseOnLoad: true"> </script> <script type="text/javascript"> dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.layout.AccordionContainer"); </script> <link rel="stylesheet" type="text/css" href="http:

dijit.byId doesn't work on IE8 with dojo.addOnLoad

泪湿孤枕 提交于 2019-12-11 00:35:13
问题 When I load this script with IE8, I've got exception Object does not support this property or method . But it works with other browsers. I use dijit 1.3.1 and I don't understand. dojo.addOnLoad(init); var DG; var datas; function init(){ DG = dijit.byId("DG"); } I've had parseOnload: true but it changes anything. <script type="text/javascript" src="dojo/dojo.js" djConfig="parseOnLoad: true"> </script> 回答1: This migth probably not fix the problem, but the function init() is used before it was

Set datagrid to show just 5 rows per page

£可爱£侵袭症+ 提交于 2019-12-11 00:13:57
问题 I am using DOJO for data grid presentation <div id="grid_log" dojoType="dojox.grid.DataGrid" store="log" structure="window.layout_log" queryOptions="{deep:true}" query="{}" clientSort="true" rowsPerPage="5"> </div> but problem is that grid_log doesn't show just 5 rows per page. What is wrong with this tag ? Why ignores rowsPerPage="5" ? 回答1: It's look like the rowsPerPage value isn't pages that are "viewed" - but rather, "virtual" pages. That is, the grid only renders portions of itself at a