dojo

How to filter dojo categorized treeGrid?

泪湿孤枕 提交于 2019-12-11 15:07:02
问题 I have dojo treeGrid that works fine. It shows projects with cost categorized by year. Also it shows totals. But when I try to filter it by one of column it mess up the grid (breaks categories and filter records improperly). Do I use grid.filter properly? I need to keep categorized structure but remove/filter certain records. Or should I refresh jsonStore somehow instead? //HTML <div id="treeGrid"></div> <a href="javascript:void(0)"> <span id='button1'>Filter</span> </a> //JavaScript var

Dojo displaying multiple tooltip on page

China☆狼群 提交于 2019-12-11 14:45:08
问题 I have a Dojo form and i would like to return errors to the form and display them in tool tips since i do not want to add extra elements to my form layout. On researching i saw Dojo doesn't allow for such implementation out of the box since the tool tip will only be displayed in items in focus. In my case i would like tool tips to be displayed for multiple items e.g for all null fields. I came across a blog where a guy did a hack however i am not sure about his implementation of such. I would

How to know which Dojo AMD require clause with no name?

烂漫一生 提交于 2019-12-11 14:16:13
问题 I have a question on Dojo declaration. I noticed in the AMD declaration for required library for dojo that some library does not have declared name in the funciton parameter. How do you know which one has no parameter? For example: For selector query, I saw an example which does not give name for dojo/NodeList-dom and dojo ready. require(["dojo/query", "dojo/dom-class", "dojo/on", "dojo/NodeList-dom", "dojo/domReady!"], function(query, domClass, on) { Is it just optional to give them names?

Replacing Dojo/Dijit NLS strings

醉酒当歌 提交于 2019-12-11 14:06:53
问题 I wish to override a NLS file (dijit/form/validate.js) file with a new one, or replace some of the NLS string mappings. I want this file to be picked up by the standard Dijits. I do not wish to delete the file in the standard Dojo library. Can I specify a path in djConfig to search directories for NLS files in order so my new file is picked up instead of the the original? If so, how do I do this? Alternatively how can I mix in a new definition of a string i.e replace: missingMessage: "This

How to pass a whole dojox.grid.DataGrid store(items json data) to servlet?

孤者浪人 提交于 2019-12-11 13:52:06
问题 I have a button on page - when clicked, it passes all the data to the servlet that could update each row data. My question is how to pass the whole store to the servlet as json data? Is there any easy way? Thanks 回答1: Here is some code I wrote to get the store to an object. Then it can be converted to JSON using dojo.toJson(obj); . I learned about this from the dojotoolkit website originally. (Give credit where credit is due). I realize this code is huge and nasty. When I looked for a better

How do I make a Textarea field with Spring Webflow and Dojo(dijit)

放肆的年华 提交于 2019-12-11 13:26:53
问题 I been trying to find out how to make a textarea field in my Spring Webflow project we are using Dojo (dijit) for the forms. can someone please help. below is my code! <td valign="top"><form:input path="bio" class="value" /> <script type="text/javascript"> Spring.addDecoration(new Spring.ElementDecoration({ elementId : "name", widgetType : "dijit.form.ValidationTextBox", widgetAttrs : { promptMessage : "Please enter your name from 2 to 10 characters", invalidMessage : "A 2 to 10 characters

Struts 2 + Dojo + Datetimepicker

百般思念 提交于 2019-12-11 13:05:44
问题 One quick question. How can I use the "simple theme" () and "dojo datetimepicker" () together? I have read that if you only want to use the simple theme, then manually import all the required dojo files using the code in head.ftl... The thing is all those js are in struts dojo jar file which is included in the class path. How can I include them in the jsp? What should be the whole path? Any example will be helpful. 回答1: Performance Tuning 1. Enable Freemarker template caching In Struts

Dojox's JsonRestStore loading the same thing several times

别说谁变了你拦得住时间么 提交于 2019-12-11 13:02:20
问题 I'm using a lazy loading tree in a web app project; however, I've ran into some strange behavior. It seems a simple tree with just 3 levels causes 7 requests for the root structure. After looking at the official JRS tree test, I'm not sure whether this is normal or not. Have a look at this example: http://download.dojotoolkit.org/release-1.6.1/dojo-release-1.6.1/dijit/tests/tree/Tree_with_JRS.html When I visit it, my browser makes 5 requests for the root structure. My only question is why?

Is it possible to have a button start a download of a dom element?

[亡魂溺海] 提交于 2019-12-11 12:38:21
问题 I have an svg that is generated in a page, I am not bringing it in from an outside source. I want this svg to be downloadable for printing. Is there a way (using client side Javascript) to download a dom node as a text file? I am limited to dojo and d3 libraries for this project. 回答1: Assuming the client is using a HTML5 web browser, this can be achieved pretty easily using <a>s download attribute. You will need to simulate a click with a MouseEvent on this element if you want the behaviour

Dojo: Select a tab on load depending on url parameter

爱⌒轻易说出口 提交于 2019-12-11 12:12:49
问题 Is there a way to select a tab in a tab container upon load depending on a url parameter? I have tried the following but nothing seems to happen and the tab I want is not selected: dojo.addOnLoad(function() { tabToSelect = getParameter("tab"); if(tabToSelect){ dijit.byId("container").selectChild(tabToSelect); } } I have console logged out the parameter and I know it is correct. I have a strong feeling I am missing something.... 回答1: For those that might have the same question, I got the