dojo

When dojo.js loaded via ajax multiple times get Error: defineAlreadyDefined

人走茶凉 提交于 2019-12-11 07:45:10
问题 I use jquery to load in sub-pages via ajax. The sub-page has some dojo widgets which work ok the first time. But subsequent loads I get Error: defineAlreadyDefined and the rest of the javascripts after this point is not run which means some key jquery instructions, e.g. UI layout. Can any one help as I have searched the web for this "Error: defineAlreadyDefined" of dojo and the best I came up with was it was addressed in dojo 1.6, however I am using 1.7.2 . I hope that I am doing something

Programmatically creating a Dojo DataGrid: “Sorry, an error occurred.” Layout issue?

喜夏-厌秋 提交于 2019-12-11 07:41:57
问题 I'm attempting to create a DataGrid with some data retrieved from a Web Service. After a lot of suffering I realized the problem is not in the data nor in the service. I was able to create the DataGrid declaratively, but I need to do it programmatically, since I will be doing it in more complex scenarios. I went from a complex use case to a very simple one and it's still failing. What I'm seeing is just the DataGrid, but with the classic "Sorry, an error occurred" error. +----------+---------

How to deal with overlapping X-axis labels in DOJO chart?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 07:38:17
问题 I have recently starting using the dojo library, and I am currently having some formatting problems with my x-axis labels. A few of the labels have longer names, and thus there is some overlap going on. Is there some way to have the labels automatically space themselves, or for longer labels to appear below the others so that they do not overlap the other labels? I have tried using the rotation property, bu I was not satisfied with the result. While it did prevent overlapping, it also

Dojo and ajax - initializing html with the dojoType attr

烂漫一生 提交于 2019-12-11 07:15:39
问题 I have a page that has multiple parts of the page loaded via ajax, ie: <body> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js" djConfig="parseOnLoad: true, isDebug:true"></script> <div class="load_when_user_clicks_here"></div> <div class="load_when_user_clicks_here"></div> <div class="load_when_user_clicks_here"></div> </body> The javascript I have will then replace the innerHTML with html fetched from the server. I've been able to get jquery

dojox chart highlight effect not working

做~自己de王妃 提交于 2019-12-11 06:58:13
问题 I've created a simple column chart using dojo version 1.8 and I want to add a highlight effect on mouseover for each column. Dojo's dojox charting API provides a nice class called Highlight that you should be able to instantiate injecting a chart instance and a plot name as below... new Highlight(ChartInstance, "plotName"); Here is the docs to support this: http://dojotoolkit.org/reference-guide/1.8/dojox/charting.html#highlight http://dojotoolkit.org/api/1.8/dojox/charting/action2d/Highlight

Dojo custom language variants

那年仲夏 提交于 2019-12-11 06:33:22
问题 Does Dojo support creation of custom language variants to be used for with Dojo's locale and i18n Does anyone know if I am able to create a custom language variant for Dojo's locale that works with i18n?. Example define({ root: { greeting: "Hello, world!" } "de-myVariant" : true }); 回答1: Yes, it can be done. If you have nls/SampleApp.js as: define({ root: { greeting: "Hello!" } "de" : true, "de-at": true, "de-x-mundl": true }); then there would be three sub-directories under nls : nls/de nls

IBM Worklight - Unable to fix tabbar to the bottom of the screen

余生长醉 提交于 2019-12-11 06:25:55
问题 I am trying to develop a simple application that has a header and a footer (tab bar) which consist of two labels. Html: <div data-dojo-type="dojox.mobile.View" id="Img1"> <ul data-dojo-type="dojox.mobile.TabBar" fixed="bottom"> <li data-dojo-type="dojox.mobile.TabBarButton" icon="images/Arrow-turn-right-icon.png" data-dojo-props="transition:'flip',dir:'-1',moveTo:Home">Label</li> </ul> </div> When I tried this, the tab bar still appears at the top of the screen. How can i fix that at the

Saving a Dgrid JsonRest-based Store

夙愿已清 提交于 2019-12-11 06:24:47
问题 I have a dgrid that has editable date fields. Above it, I have a "Save" button that calls grid.save . When I hit the button, it makes an XHR request back to the store's target, but does not provide any data back to the server for me to save (i.e. POST is empty). Right now it is hardwired to query item id 1900, as you can see in the code below. Here is how the store is initiated: var store = new JsonRest({ target: "/safari/resources/1900/calendarObjects/", sortParam: "sort", idProperty: "id",

Calling a java-script function when value of a Dojo auto-completer changes

只谈情不闲聊 提交于 2019-12-11 06:24:39
问题 I am trying to call a javascript function when the value of a Dojo auto completer changes. Calling the javascript function from the "onChange" attribute has no effect (I mean the function is not called/executed). In the javascript function I want to: Call a struts2 action. Change the value of a hidden field. For calling the action I have another way : publishing a topic using attribute " valueNotifyTopic="topicName" ", then I can call an action by listening to the topic. But I cant change the

How we can access the array objects of javascript passing through ajax in java?

孤人 提交于 2019-12-11 06:16:49
问题 I need to access array objects of javascript passed through ajax in java. I am using dojo. This is how I tried to pass values through dojo ajax call. Javascript var arrayObj = [{'id': 4, 'label': 'first', 'value': 'success'}, {'id': 6, 'label': 'second', 'value': 'failed'}]; dojo.xhrPost({ url: "test/deleteItems.json", content: { items: arrayObj }, handleAs: "json", load: function(response) { alert('got response'); } }); In Java(Spring MVC), I tried with List of String , array of Strings in